2001-05-06 17:54:04 +04:00
|
|
|
# $NetBSD: Makefile,v 1.32 2001/05/06 13:54:04 wiz Exp $
|
1998-12-17 14:34:10 +03:00
|
|
|
|
1999-02-09 23:27:04 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
.if (${OBJECT_FMT} == "a.out")
|
1993-10-17 00:54:08 +03:00
|
|
|
PROG= ld.so
|
1998-12-17 14:34:10 +03:00
|
|
|
SRCS= mdprologue.S rtld.c malloc.c shlib.c md.c vfprintf.c
|
|
|
|
CLIB= ${.CURDIR}/../../lib/libc
|
1998-05-21 04:31:05 +04:00
|
|
|
CLIBOBJ!=cd ${CLIB}; \
|
|
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
|
1998-07-25 16:37:27 +04:00
|
|
|
PICFLAG=-fpic -fno-function-cse
|
1998-12-17 14:34:10 +03:00
|
|
|
CPPFLAGS+=$(PICFLAG) -DRTLD -DLIBC_SCCS \
|
|
|
|
-I${CLIB}/include -I$(.CURDIR)/arch/$(MACHINE_ARCH) -I$(.CURDIR)
|
1998-08-13 11:34:05 +04:00
|
|
|
.if defined(DEBUG)
|
|
|
|
CPPFLAGS+=-DDEBUG
|
|
|
|
.endif
|
1993-12-10 08:10:22 +03:00
|
|
|
ASFLAGS+=-k
|
1998-05-21 04:31:05 +04:00
|
|
|
LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic -L${CLIBOBJ}
|
1997-06-01 01:21:13 +04:00
|
|
|
.if defined(DESTDIR)
|
|
|
|
LDFLAGS+= -nostdlib -L${DESTDIR}/usr/lib
|
1996-06-09 02:22:26 +04:00
|
|
|
.endif
|
1993-12-10 08:10:22 +03:00
|
|
|
LDADD+= -lc_pic
|
1997-03-25 01:02:40 +03:00
|
|
|
DPADD+= ${LIBC_PIC}
|
1993-10-17 00:54:08 +03:00
|
|
|
|
1998-12-17 14:34:10 +03:00
|
|
|
.PATH: ${CLIB}/stdio $(.CURDIR)/arch/$(MACHINE_ARCH)
|
1993-10-17 00:54:08 +03:00
|
|
|
|
|
|
|
$(PROG):
|
1993-12-10 08:10:22 +03:00
|
|
|
$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
|
1993-10-17 00:54:08 +03:00
|
|
|
|
|
|
|
.S.o:
|
1993-12-10 08:10:22 +03:00
|
|
|
${CPP} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET} -
|
2001-04-18 15:48:21 +04:00
|
|
|
.elif (${OBJECT_FMT} == "ELF" && \
|
|
|
|
(${MACHINE_ARCH} == "i386" || \
|
|
|
|
${MACHINE_ARCH} == "m68k" || \
|
|
|
|
${MACHINE_ARCH} == "sparc"))
|
2000-09-12 03:23:21 +04:00
|
|
|
|
|
|
|
FILES= ld.so
|
2000-09-12 20:39:51 +04:00
|
|
|
FILESDIR= /usr/libexec
|
2000-09-12 03:23:21 +04:00
|
|
|
FILESMODE= ${BINMODE}
|
|
|
|
CLEANFILES+= ld.so
|
|
|
|
|
2000-09-12 20:39:51 +04:00
|
|
|
all dependall: ${FILES}
|
2000-09-12 03:23:21 +04:00
|
|
|
|
|
|
|
ld.so: ${.CURDIR}/ld.so.${MACHINE_ARCH}.uue
|
|
|
|
uudecode ${.ALLSRC}
|
|
|
|
|
|
|
|
.include <bsd.files.mk>
|
|
|
|
|
1997-06-23 17:25:41 +04:00
|
|
|
.endif
|
|
|
|
|
2001-05-06 17:54:04 +04:00
|
|
|
MAN= ld.aout_so.1
|
1993-10-17 00:54:08 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|