ports makefile stuff (bsd.lib.mk)
Jim Stapleton
stapleton.41 at gmail.com
Fri Feb 8 14:39:49 UTC 2008
> Objects are put in OBJDIR. If you have not set MAKEOBJDIRPREFIX in the
> environment, this will default to ${.CURDIR} and give you a warning.
I tried setting MAKEOBJDIRPREFIX as shown in the makefile copy below,
but the libraries are still appearing in the source directory
(src/backends/core) and not in the directory I want them to output to
(src/objs). I tried using OBJDIR instead, but without any success.
I tried all four of these lines, only the last removed the warning,
but it still had the objects built to the source directory.
MAKEOBJDIRPREFIX=$(OBJPATH)
OBJDIRPREFIX=$(OBJPATH)
OBJDIR=$(OBJPATH)
.OBJDIR=$(OBJPATH)
Any suggestions on what I am doing wrong?
Thank you,
-Jim Stapleton
#directories/requirements
#In order of most likely to least likely to change
#what we are building
OBJNAME=vp_backend_core
VERSION=1.0
SRCS=back_end_core.c
HDRS= ../../include/virtual_ports_backend.h
REQLIB=
OBJPATH=../../objs
INCLUDE_PATHS=-I../../include -I/usr/local/include
LIB_PATHS=-L/usr/local/lib -L$(OBJPATH)
#beyond this point *shouldn't* need change between files
CFLAGS+= $(INCLUDE_PATHS)
CXXFLAGS+= $(INCLUDE_PATHS)
LDADD=$(LIB_PATHS) $(REQLIB)
.if defined(DEBUG)
CFLAGS+=-g -D DEBUG
CXXFLAGS+=-g -D DEBUG
.endif
#for bsd.lib.mk
LIB=$(OBJNAME)-$(VERSION)
SHLIB_NAME=$(OBJNAME)-$(VERSION)
INSTALL_PIC_ARCHIVE=1
OTHER=Makefile
MAKEOBJDIRPREFIX=$(OBJPATH)
.include <bsd.lib.mk>
More information about the freebsd-questions
mailing list