NetBSD/libexec/ld.aout_so/Makefile

37 lines
909 B
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.28 1999/03/19 22:06:37 thorpej 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}; \
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
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
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} -
1997-06-23 17:25:41 +04:00
.endif
MAN= rtld.1
MLINKS= rtld.1 ld.so.1
.include <bsd.prog.mk>