NetBSD/libexec/ld.aout_so/Makefile

64 lines
1.6 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.44 2003/10/21 10:01:20 lukem Exp $
2002-11-12 17:33:48 +03:00
.include <bsd.own.mk> # for OBJECT_FMT definition
.include <bsd.shlib.mk> # for SHLINKINSTALLDIR definition
.if (${OBJECT_FMT} == "a.out")
PROG= ld.so
SRCS= mdprologue.S rtld.c malloc.c shlib.c md.c vfprintf.c
2002-11-12 17:33:48 +03:00
BINDIR= ${SHLINKINSTALLDIR}
CLIB= ${NETBSDSRCDIR}/lib/libc
2002-03-06 00:53:56 +03:00
CLIBOBJ!=cd ${CLIB} && ${PRINTOBJDIR}
1998-07-25 16:37:27 +04:00
PICFLAG=-fpic -fno-function-cse
CPPFLAGS+=$(PICFLAG) -DRTLD -DLIBC_SCCS \
-I${CLIB}/include -I$(.CURDIR)/arch/$(MACHINE_ARCH) -I$(.CURDIR)
.if defined(DEBUG)
CPPFLAGS+=-DDEBUG
.endif
2002-11-12 17:33:48 +03:00
.if ${SHLIBINSTALLDIR} != ${LIBDIR}
CPPFLAGS+=-DSTANDARD_SEARCH_DIRS=\"${SHLIBINSTALLDIR}\",\"${LIBDIR}\"
.endif
1993-12-10 08:10:22 +03:00
ASFLAGS+=-k
LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic -L${CLIBOBJ}
.if defined(DESTDIR)
LDFLAGS+= -nostdlib -L${DESTDIR}/usr/lib
.endif
1993-12-10 08:10:22 +03:00
LDADD+= -lc_pic
1997-03-25 01:02:40 +03:00
DPADD+= ${LIBC_PIC}
.PATH: ${CLIB}/stdio $(.CURDIR)/arch/$(MACHINE_ARCH)
$(PROG):
1993-12-10 08:10:22 +03:00
$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
.S.o:
1993-12-10 08:10:22 +03:00
${CPP} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET} -
2002-11-12 17:33:48 +03:00
.if ${SHLINKINSTALLDIR} != "/usr/libexec"
SYMLINKS+= ${SHLINKINSTALLDIR}/${PROG} /usr/libexec/${PROG}
.endif
.elif (${OBJECT_FMT} == "ELF" && \
(${MACHINE_ARCH} == "arm" || \
${MACHINE_ARCH} == "i386" || \
${MACHINE_ARCH} == "m68k" || \
${MACHINE_ARCH} == "sparc" || \
${MACHINE_ARCH} == "vax"))
FILES= ld.so
FILESDIR= /usr/libexec
FILESMODE= ${BINMODE}
CLEANFILES+= ld.so
all dependall: ${FILES}
ld.so: ${.CURDIR}/ld.so.${MACHINE_ARCH}.uue
${_MKTARGET_CREATE}
${TOOL_UUDECODE} ${.ALLSRC}
1997-06-23 17:25:41 +04:00
.endif
MAN= ld.aout_so.1
.include <bsd.prog.mk>