Expand PMF_FN_* macros.
[netbsd-mini2440.git] / libexec / ld.aout_so / Makefile
blob65bdb81c639f287eea8d0a4354d6329613ca33ec
1 # $NetBSD: Makefile,v 1.45 2004/03/19 08:07:28 jmc Exp $
3 .include <bsd.own.mk> # for OBJECT_FMT definition
4 .include <bsd.shlib.mk> # for SHLINKINSTALLDIR definition
5 .if ${MKPIC} != "no"
6 .if (${OBJECT_FMT} == "a.out")
7 PROG= ld.so
8 SRCS= mdprologue.S rtld.c malloc.c shlib.c md.c vfprintf.c
9 BINDIR= ${SHLINKINSTALLDIR}
11 CLIB= ${NETBSDSRCDIR}/lib/libc
12 CLIBOBJ!=cd ${CLIB} && ${PRINTOBJDIR}
13 PICFLAG=-fpic -fno-function-cse
14 CPPFLAGS+=$(PICFLAG) -DRTLD -DLIBC_SCCS \
15 -I${CLIB}/include -I$(.CURDIR)/arch/$(MACHINE_ARCH) -I$(.CURDIR)
16 .if defined(DEBUG)
17 CPPFLAGS+=-DDEBUG
18 .endif
19 .if ${SHLIBINSTALLDIR} != ${LIBDIR}
20 CPPFLAGS+=-DSTANDARD_SEARCH_DIRS=\"${SHLIBINSTALLDIR}\",\"${LIBDIR}\"
21 .endif
22 ASFLAGS+=-k
23 LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic -L${CLIBOBJ}
24 .if defined(DESTDIR)
25 LDFLAGS+= -nostdlib -L${DESTDIR}/usr/lib
26 .endif
27 LDADD+= -lc_pic
28 DPADD+= ${LIBC_PIC}
30 .PATH: ${CLIB}/stdio $(.CURDIR)/arch/$(MACHINE_ARCH)
32 $(PROG):
33 $(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
35 .S.o:
36 ${CPP} ${.IMPSRC} | ${AS} ${ASFLAGS} -o ${.TARGET} -
38 .if ${SHLINKINSTALLDIR} != "/usr/libexec"
39 SYMLINKS+= ${SHLINKINSTALLDIR}/${PROG} /usr/libexec/${PROG}
40 .endif
42 .elif (${OBJECT_FMT} == "ELF" && \
43 (${MACHINE_ARCH} == "arm" || \
44 ${MACHINE_ARCH} == "i386" || \
45 ${MACHINE_ARCH} == "m68k" || \
46 ${MACHINE_ARCH} == "sparc" || \
47 ${MACHINE_ARCH} == "vax"))
49 FILES= ld.so
50 FILESDIR= /usr/libexec
51 FILESMODE= ${BINMODE}
52 UUDECODE_FILES= ld.so.${MACHINE_ARCH}
53 UUDECODE_FILES_RENAME_${UUDECODE_FILES}= ld.so
55 all dependall: ${FILES}
57 ld.so: ld.so.${MACHINE_ARCH}
59 .endif
60 .endif
62 MAN= ld.aout_so.1
64 .include <bsd.files.mk>
65 .include <bsd.prog.mk>