Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Feb 2008 09:39:42 -0500
From:      "Jim Stapleton" <stapleton.41@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ports makefile stuff (bsd.lib.mk)
Message-ID:  <80f4f2b20802080639y74d5cf3dye856a18c47a99cdc@mail.gmail.com>
In-Reply-To: <200802072154.06464.fbsd.questions@rachie.is-a-geek.net>
References:  <80f4f2b20802060749p60c9d0ddw83b1ecbbed19db47@mail.gmail.com> <200802072154.06464.fbsd.questions@rachie.is-a-geek.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> 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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?80f4f2b20802080639y74d5cf3dye856a18c47a99cdc>