1999-04-29 15:31:05 +00:00
|
|
|
# $NetBSD: Makefile,v 1.28 1999/04/29 15:31:05 kleink Exp $
|
1996-12-16 20:37:55 +00:00
|
|
|
|
1998-02-23 10:09:31 +00:00
|
|
|
.include <bsd.own.mk> # for OBJECT_FMT definition
|
|
|
|
|
1999-02-13 02:54:17 +00:00
|
|
|
.if ${OBJECT_FMT} == "ELF" && ${MKPIC} != "no"
|
1996-12-16 20:37:55 +00:00
|
|
|
PROG= ld.elf_so
|
1997-10-23 19:27:28 +00:00
|
|
|
.endif
|
|
|
|
|
1999-03-05 11:57:54 +00:00
|
|
|
ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/}
|
|
|
|
M= ${.CURDIR}/arch/${ARCHSUBDIR}
|
1999-03-03 12:00:18 +00:00
|
|
|
|
1999-04-29 15:31:05 +00:00
|
|
|
.if (${MACHINE_ARCH} == "alpha") || \
|
|
|
|
(${MACHINE_ARCH} == "i386") || \
|
|
|
|
(${MACHINE_ARCH} == "m68k") || \
|
|
|
|
(${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || \
|
|
|
|
(${MACHINE_ARCH} == "powerpc") || \
|
|
|
|
(${MACHINE_ARCH} == "sparc") || \
|
|
|
|
(${MACHINE_ARCH} == "sparc64")
|
1997-10-22 05:45:08 +00:00
|
|
|
# Adds SRCS, CPPFLAGS, LDFLAGS, etc. Must go first so MD startup source
|
1996-12-16 20:37:55 +00:00
|
|
|
# is first.
|
1999-03-03 12:00:18 +00:00
|
|
|
.if exists($M/Makefile.inc)
|
|
|
|
.include "$M/Makefile.inc"
|
1997-04-10 17:39:20 +00:00
|
|
|
.endif
|
1996-12-16 20:37:55 +00:00
|
|
|
|
1998-08-27 01:55:16 +00:00
|
|
|
CLIBOBJ!=cd ${.CURDIR}/../../lib/libc; \
|
|
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
|
|
|
|
|
1996-12-16 20:37:55 +00:00
|
|
|
SRCS+= rtld.c reloc.c symbol.c malloc.c xmalloc.c xprintf.c debug.c \
|
|
|
|
map_object.c load.c search.c headers.c paths.c
|
1997-10-22 05:45:08 +00:00
|
|
|
CPPFLAGS+= -Wall -DLIBDIR=\"${LIBDIR}\" -D_PATH_RTLD=\"${BINDIR}/${PROG}\"
|
1999-02-24 18:31:00 +00:00
|
|
|
CPPFLAGS+= -I${.CURDIR}
|
1997-10-22 05:45:08 +00:00
|
|
|
CPPFLAGS+= -DDEBUG -DRTLD_LOADER
|
1999-02-07 17:23:03 +00:00
|
|
|
#CPPFLAGS+= -DRTLD_DEBUG -DRTLD_DEBUG_RELOC
|
1996-12-16 20:37:55 +00:00
|
|
|
|
1998-08-27 01:55:16 +00:00
|
|
|
LDADD+= -L${DESTDIR}/${LIBDIR} -L${CLIBOBJ} -non_shared -lc_pic
|
1997-03-24 22:15:37 +00:00
|
|
|
DPADD+= ${LIBC_PIC}
|
1996-12-16 20:37:55 +00:00
|
|
|
|
1997-04-17 22:17:27 +00:00
|
|
|
STRIPFLAG=
|
1996-12-16 20:37:55 +00:00
|
|
|
|
1999-03-03 12:00:18 +00:00
|
|
|
.PATH: $M
|
1996-12-16 20:37:55 +00:00
|
|
|
|
|
|
|
${PROG}: ${OBJS} ${DPADD}
|
|
|
|
${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD}
|
1997-06-23 04:51:16 +00:00
|
|
|
.endif
|
|
|
|
|
1999-02-13 02:54:17 +00:00
|
|
|
MKMAN= no
|
1996-12-16 20:37:55 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|