1999-03-04 00:18:00 +03:00
|
|
|
# $NetBSD: Makefile,v 1.24 1999/03/03 21:18:00 christos Exp $
|
1996-12-16 23:37:55 +03:00
|
|
|
|
1998-02-23 13:09:31 +03:00
|
|
|
.include <bsd.own.mk> # for OBJECT_FMT definition
|
|
|
|
|
1999-02-13 05:54:17 +03:00
|
|
|
.if ${OBJECT_FMT} == "ELF" && ${MKPIC} != "no"
|
1996-12-16 23:37:55 +03:00
|
|
|
PROG= ld.elf_so
|
1997-10-23 23:27:28 +04:00
|
|
|
.endif
|
|
|
|
|
1999-03-03 15:00:18 +03:00
|
|
|
M= ${.CURDIR}/arch/${MACHINE_ARCH:S/mipse[bl]/mips/}
|
|
|
|
|
|
|
|
.if (${MACHINE} == "alpha") || \
|
|
|
|
(${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || \
|
1999-01-10 21:18:56 +03:00
|
|
|
(${MACHINE_ARCH} == "powerpc") || (${MACHINE} == "sparc64") || \
|
1999-02-24 21:31:00 +03:00
|
|
|
(${MACHINE} == "i386") || (${MACHINE} == "sparc")
|
1997-10-22 09:45:08 +04:00
|
|
|
# Adds SRCS, CPPFLAGS, LDFLAGS, etc. Must go first so MD startup source
|
1996-12-16 23:37:55 +03:00
|
|
|
# is first.
|
1999-03-03 15:00:18 +03:00
|
|
|
.if exists($M/Makefile.inc)
|
|
|
|
.include "$M/Makefile.inc"
|
1997-04-10 21:39:20 +04:00
|
|
|
.endif
|
1996-12-16 23:37:55 +03:00
|
|
|
|
1998-08-27 05:55:16 +04:00
|
|
|
CLIBOBJ!=cd ${.CURDIR}/../../lib/libc; \
|
|
|
|
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f-
|
|
|
|
|
1996-12-16 23:37:55 +03: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 09:45:08 +04:00
|
|
|
CPPFLAGS+= -Wall -DLIBDIR=\"${LIBDIR}\" -D_PATH_RTLD=\"${BINDIR}/${PROG}\"
|
1999-02-24 21:31:00 +03:00
|
|
|
CPPFLAGS+= -I${.CURDIR}
|
1997-10-22 09:45:08 +04:00
|
|
|
CPPFLAGS+= -DDEBUG -DRTLD_LOADER
|
1999-02-07 20:23:03 +03:00
|
|
|
#CPPFLAGS+= -DRTLD_DEBUG -DRTLD_DEBUG_RELOC
|
1996-12-16 23:37:55 +03:00
|
|
|
|
1998-08-27 05:55:16 +04:00
|
|
|
LDADD+= -L${DESTDIR}/${LIBDIR} -L${CLIBOBJ} -non_shared -lc_pic
|
1997-03-25 01:15:37 +03:00
|
|
|
DPADD+= ${LIBC_PIC}
|
1996-12-16 23:37:55 +03:00
|
|
|
|
1998-08-13 22:16:43 +04:00
|
|
|
.if (${OBJECT_FMT} == "ELF")
|
1996-12-16 23:37:55 +03:00
|
|
|
# to be installed
|
1999-02-21 21:10:24 +03:00
|
|
|
INCS= link.h
|
|
|
|
INCSDIR=/usr/include
|
1998-08-13 22:16:43 +04:00
|
|
|
.endif
|
1996-12-16 23:37:55 +03:00
|
|
|
|
1997-04-18 02:17:27 +04:00
|
|
|
STRIPFLAG=
|
1996-12-16 23:37:55 +03:00
|
|
|
|
1999-03-03 15:00:18 +03:00
|
|
|
.PATH: $M
|
1996-12-16 23:37:55 +03:00
|
|
|
|
|
|
|
${PROG}: ${OBJS} ${DPADD}
|
|
|
|
${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD}
|
1997-06-23 08:51:16 +04:00
|
|
|
.endif
|
|
|
|
|
1999-02-13 05:54:17 +03:00
|
|
|
MKMAN= no
|
1996-12-16 23:37:55 +03:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|