1 1.23 jonathan # $NetBSD: Makefile,v 1.23 1999/03/03 12:00:19 jonathan Exp $ 2 1.5 cjs 3 1.11 jonathan .include <bsd.own.mk> # for OBJECT_FMT definition 4 1.11 jonathan 5 1.20 lukem .if ${OBJECT_FMT} == "ELF" && ${MKPIC} != "no" 6 1.1 cgd PROG= ld.elf_so 7 1.9 jonathan .endif 8 1.9 jonathan 9 1.23 jonathan M= ${.CURDIR}/arch/${MACHINE_ARCH:S/mipse[bl]/mips/} 10 1.23 jonathan 11 1.23 jonathan .if (${MACHINE} == "alpha") || \ 12 1.23 jonathan (${MACHINE_ARCH} == "mipsel") || (${MACHINE_ARCH} == "mipseb") || \ 13 1.18 christos (${MACHINE_ARCH} == "powerpc") || (${MACHINE} == "sparc64") || \ 14 1.22 christos (${MACHINE} == "i386") || (${MACHINE} == "sparc") 15 1.8 lukem # Adds SRCS, CPPFLAGS, LDFLAGS, etc. Must go first so MD startup source 16 1.1 cgd # is first. 17 1.23 jonathan .if exists($M/Makefile.inc) 18 1.23 jonathan .include "$M/Makefile.inc" 19 1.3 cgd .endif 20 1.1 cgd 21 1.15 tv CLIBOBJ!=cd ${.CURDIR}/../../lib/libc; \ 22 1.15 tv printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}\n" | ${MAKE} -s -f- 23 1.15 tv 24 1.1 cgd SRCS+= rtld.c reloc.c symbol.c malloc.c xmalloc.c xprintf.c debug.c \ 25 1.1 cgd map_object.c load.c search.c headers.c paths.c 26 1.8 lukem CPPFLAGS+= -Wall -DLIBDIR=\"${LIBDIR}\" -D_PATH_RTLD=\"${BINDIR}/${PROG}\" 27 1.22 christos CPPFLAGS+= -I${.CURDIR} 28 1.8 lukem CPPFLAGS+= -DDEBUG -DRTLD_LOADER 29 1.19 christos #CPPFLAGS+= -DRTLD_DEBUG -DRTLD_DEBUG_RELOC 30 1.1 cgd 31 1.15 tv LDADD+= -L${DESTDIR}/${LIBDIR} -L${CLIBOBJ} -non_shared -lc_pic 32 1.2 christos DPADD+= ${LIBC_PIC} 33 1.22 christos CFLAGS+=-g 34 1.1 cgd 35 1.14 christos .if (${OBJECT_FMT} == "ELF") 36 1.1 cgd # to be installed 37 1.21 kleink INCS= link.h 38 1.21 kleink INCSDIR=/usr/include 39 1.14 christos .endif 40 1.1 cgd 41 1.4 thorpej STRIPFLAG= 42 1.1 cgd 43 1.23 jonathan .PATH: $M 44 1.1 cgd 45 1.1 cgd ${PROG}: ${OBJS} ${DPADD} 46 1.1 cgd ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LDADD} 47 1.7 mrg .endif 48 1.7 mrg 49 1.20 lukem MKMAN= no 50 1.1 cgd 51 1.1 cgd .include <bsd.prog.mk> 52