1997-10-22 20:00:39 +04:00
|
|
|
# $NetBSD: Makefile,v 1.17 1997/10/22 16:02:27 lukem Exp $
|
1994-05-24 11:33:47 +04:00
|
|
|
# from: @(#)Makefile 8.1 (Berkeley) 6/1/93
|
|
|
|
|
1997-10-22 20:00:39 +04:00
|
|
|
CPPFLAGS+= -DLIBC_SCCS -DPIC -DDYNAMIC -DELFSIZE=32
|
|
|
|
CPPFLAGS+= -I${.CURDIR}/../../../libexec/ld.elf_so
|
|
|
|
COPTS+= -fPIC
|
1997-03-05 06:45:05 +03:00
|
|
|
|
|
|
|
OBJS= crt0.o gcrt0.o crtn.o # crtbegin.o crtend.o
|
1994-05-24 11:33:47 +04:00
|
|
|
CLEANFILES+= core a.out
|
|
|
|
|
|
|
|
all: ${OBJS}
|
|
|
|
|
1997-03-05 06:45:05 +03:00
|
|
|
crt0.o: crt0.c
|
1997-10-22 20:00:39 +04:00
|
|
|
@echo "${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}"
|
|
|
|
@${COMPILE.c} -DCRT0 ${.ALLSRC} -o ${.TARGET}.o
|
1997-03-05 06:45:05 +03:00
|
|
|
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
|
|
|
|
@rm -f ${.TARGET}.o
|
|
|
|
|
|
|
|
gcrt0.o: crt0.c
|
1997-10-22 20:00:39 +04:00
|
|
|
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
|
|
|
|
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
|
1997-03-05 06:45:05 +03:00
|
|
|
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
|
|
|
|
@rm -f ${.TARGET}.o
|
1994-05-24 11:33:47 +04:00
|
|
|
|
1997-03-05 06:45:05 +03:00
|
|
|
crtn.o: crtend.c
|
1997-10-22 20:00:39 +04:00
|
|
|
@echo "${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}"
|
|
|
|
@${COMPILE.c} -DMCRT0 ${.ALLSRC} -o ${.TARGET}.o
|
1997-03-05 06:45:05 +03:00
|
|
|
@${LD} -x -r -o ${.TARGET} ${.TARGET}.o
|
|
|
|
@rm -f ${.TARGET}.o
|
1994-05-24 11:33:47 +04:00
|
|
|
|
|
|
|
install:
|
1996-10-18 09:27:38 +04:00
|
|
|
${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
|
1995-01-08 02:21:41 +03:00
|
|
|
${DESTDIR}/usr/lib
|
1997-05-20 03:24:21 +04:00
|
|
|
ln -f ${DESTDIR}/usr/lib/crt0.o ${DESTDIR}/usr/lib/scrt0.o
|
1994-05-24 11:33:47 +04:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|