1999-02-09 23:27:04 +03:00
|
|
|
# $NetBSD: Makefile,v 1.27 1999/02/09 20:27:04 christos 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}
|
1996-12-24 01:13:03 +03:00
|
|
|
HDRS= link.h
|
1997-03-25 01:02:40 +03:00
|
|
|
INCS=${HDRS}
|
|
|
|
INCSDIR=/usr/include
|
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} -
|
1997-06-23 17:25:41 +04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
MAN= rtld.1
|
|
|
|
MLINKS= rtld.1 ld.so.1
|
1993-10-17 00:54:08 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|