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
6 .if
(${OBJECT_FMT} == "a.out")
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
)
19 .if
${SHLIBINSTALLDIR} != ${LIBDIR}
20 CPPFLAGS
+=-DSTANDARD_SEARCH_DIRS
=\"${SHLIBINSTALLDIR}\",\"${LIBDIR}\"
23 LDFLAGS
+=-Bshareable
-Bsymbolic
-assert nosymbolic
-L
${CLIBOBJ}
25 LDFLAGS
+= -nostdlib
-L
${DESTDIR}/usr
/lib
30 .PATH
: ${CLIB}/stdio
$(.CURDIR
)/arch
/$(MACHINE_ARCH
)
33 $(LD
) -o
$(PROG
) $(LDFLAGS
) $(OBJS
) $(LDADD
)
36 ${CPP} ${.IMPSRC
} |
${AS} ${ASFLAGS} -o
${.TARGET
} -
38 .if
${SHLINKINSTALLDIR} != "/usr/libexec"
39 SYMLINKS
+= ${SHLINKINSTALLDIR}/${PROG} /usr
/libexec
/${PROG}
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"))
50 FILESDIR
= /usr
/libexec
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}
64 .
include <bsd.files.mk
>
65 .
include <bsd.prog.mk
>