2001-12-15 01:21:45 +03:00
|
|
|
# $NetBSD: Makefile,v 1.40 2001/12/14 22:21:45 thorpej 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-03-05 14:57:54 +03:00
|
|
|
ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/}
|
|
|
|
M= ${.CURDIR}/arch/${ARCHSUBDIR}
|
1999-03-03 15:00:18 +03:00
|
|
|
|
1999-05-08 02:04:27 +04:00
|
|
|
.if ((${MACHINE_ARCH} == "alpha") || \
|
2001-07-15 07:09:22 +04:00
|
|
|
(${MACHINE_ARCH} == "arm") || \
|
1999-05-08 02:04:27 +04:00
|
|
|
(${MACHINE_ARCH} == "i386") || \
|
|
|
|
(${MACHINE_ARCH} == "m68k") || \
|
|
|
|
(${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || \
|
|
|
|
(${MACHINE_ARCH} == "powerpc") || \
|
|
|
|
(${MACHINE_ARCH} == "sparc") || \
|
2000-07-03 07:30:52 +04:00
|
|
|
(${MACHINE_ARCH} == "sparc64") || \
|
2001-06-19 05:11:03 +04:00
|
|
|
(${MACHINE_ARCH} == "x86_64") || \
|
2000-07-03 07:30:52 +04:00
|
|
|
(${MACHINE_ARCH} == "vax")) && \
|
1999-05-08 02:04:27 +04:00
|
|
|
${OBJECT_FMT} == "ELF" && ${MKPIC} != "no"
|
|
|
|
|
|
|
|
PROG= ld.elf_so
|
|
|
|
|
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
|
|
|
|
|
|
|
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
|
2001-12-15 01:21:45 +03:00
|
|
|
|
|
|
|
CPPFLAGS+= -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-07-05 21:55:34 +04:00
|
|
|
CPPFLAGS+= -D_RTLD_SOURCE
|
2000-07-15 02:01:09 +04:00
|
|
|
#CPPFLAGS+= -DRTLD_DEBUG
|
|
|
|
#CPPFLAGS+= -DRTLD_DEBUG_RELOC
|
2000-11-11 00:31:30 +03:00
|
|
|
#DBG= -g
|
1996-12-16 23:37:55 +03:00
|
|
|
|
2000-03-27 01:55:55 +04:00
|
|
|
LDADD+= -non_shared -L${DESTDIR}/${LIBDIR} -lc_pic
|
1997-03-25 01:15:37 +03:00
|
|
|
DPADD+= ${LIBC_PIC}
|
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
|
|
|
|
2001-01-14 12:39:26 +03:00
|
|
|
${PROG}: ${OBJS} ${DPADD}
|
1996-12-16 23:37:55 +03:00
|
|
|
${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD}
|
2001-01-14 12:16:47 +03:00
|
|
|
|
1997-06-23 08:51:16 +04:00
|
|
|
.endif
|
|
|
|
|
1996-12-16 23:37:55 +03:00
|
|
|
.include <bsd.prog.mk>
|