2c1cfc8e8c
make -V FILES from being useful (and given that every other variable can be extracted using make -V, the behaviour was unusually inconsistent given that the original reason for clearing it doesn't seem to be relevant anymore) - use <bsd.prog.mk> instead of directly including <bsd.files.mk> (and possibly <bsd.man.mk> or <bsd.own.mk>) - remove obsolete NOPROG
54 lines
1.2 KiB
Makefile
54 lines
1.2 KiB
Makefile
# $NetBSD: Makefile,v 1.38 2002/04/24 08:18:51 lukem Exp $
|
|
|
|
.include <bsd.own.mk>
|
|
.if (${OBJECT_FMT} == "a.out")
|
|
PROG= ld.so
|
|
SRCS= mdprologue.S rtld.c malloc.c shlib.c md.c vfprintf.c
|
|
CLIB= ${.CURDIR}/../../lib/libc
|
|
CLIBOBJ!=cd ${CLIB} && ${PRINTOBJDIR}
|
|
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
|
|
ASFLAGS+=-k
|
|
LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic -L${CLIBOBJ}
|
|
.if defined(DESTDIR)
|
|
LDFLAGS+= -nostdlib -L${DESTDIR}/usr/lib
|
|
.endif
|
|
LDADD+= -lc_pic
|
|
DPADD+= ${LIBC_PIC}
|
|
|
|
.PATH: ${CLIB}/stdio $(.CURDIR)/arch/$(MACHINE_ARCH)
|
|
|
|
$(PROG):
|
|
$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
|
|
|
|
.S.o:
|
|
${CPP} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET} -
|
|
.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}
|
|
|
|
UUDECODE?= uudecode
|
|
|
|
ld.so: ${.CURDIR}/ld.so.${MACHINE_ARCH}.uue
|
|
${UUDECODE} ${.ALLSRC}
|
|
|
|
.endif
|
|
|
|
MAN= ld.aout_so.1
|
|
|
|
.include <bsd.prog.mk>
|