1997-05-29 19:57:45 +04:00
|
|
|
# $NetBSD: Makefile,v 1.13 1997/05/29 15:57:46 veego Exp $
|
1993-10-17 01:02:58 +03:00
|
|
|
# from: @(#)Makefile 5.5 (Berkeley) 5/21/91
|
|
|
|
|
1995-06-05 05:57:04 +04:00
|
|
|
CFLAGS+= -DLIBC_SCCS -I${.CURDIR}/..
|
|
|
|
OBJS= crt0.o gcrt0.o scrt0.o
|
1995-09-29 14:23:15 +03:00
|
|
|
SRCS= crt0.c
|
1993-10-17 01:02:58 +03:00
|
|
|
|
1997-05-29 19:13:00 +04:00
|
|
|
.include <bsd.own.mk> # for OBJDIR and BUILDDIR
|
|
|
|
|
1993-10-17 01:02:58 +03:00
|
|
|
all: ${OBJS}
|
|
|
|
|
1995-09-29 14:23:15 +03:00
|
|
|
crt0.o: ${SRCS}
|
|
|
|
@echo "${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}"
|
|
|
|
@${COMPILE.c} -DCRT0 -DDYNAMIC ${.CURDIR}/${SRCS} -o ${.TARGET}.o
|
|
|
|
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
|
|
|
@rm -f ${.TARGET}.o
|
1997-05-26 07:55:19 +04:00
|
|
|
.if defined(OBJDIR)
|
|
|
|
@echo install -d ${BUILDDIR}${LIBDIR}
|
|
|
|
@install -d ${BUILDDIR}${LIBDIR}
|
|
|
|
@echo ${BUILDDIR}${LIBDIR}/${.TARGET} '->' `pwd`/${.TARGET};
|
|
|
|
@rm -f ${BUILDDIR}${LIBDIR}/${.TARGET};
|
|
|
|
@ln -s `pwd`/${.TARGET} ${BUILDDIR}${LIBDIR}/${.TARGET};
|
|
|
|
.endif
|
1993-10-17 01:02:58 +03:00
|
|
|
|
1995-09-29 14:23:15 +03:00
|
|
|
gcrt0.o: ${SRCS}
|
|
|
|
@echo "${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
|
|
|
|
@${COMPILE.c} -DMCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
|
|
|
|
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
|
|
|
@rm -f ${.TARGET}.o
|
1997-05-26 07:55:19 +04:00
|
|
|
.if defined(OBJDIR)
|
|
|
|
@echo install -d ${BUILDDIR}${LIBDIR}
|
|
|
|
@install -d ${BUILDDIR}${LIBDIR}
|
|
|
|
@echo ${BUILDDIR}${LIBDIR}/${.TARGET} '->' `pwd`/${.TARGET};
|
|
|
|
@rm -f ${BUILDDIR}${LIBDIR}/${.TARGET};
|
|
|
|
@ln -s `pwd`/${.TARGET} ${BUILDDIR}${LIBDIR}/${.TARGET};
|
|
|
|
.endif
|
1993-10-17 01:02:58 +03:00
|
|
|
|
1995-09-29 14:23:15 +03:00
|
|
|
scrt0.o: ${SRCS}
|
|
|
|
@echo "${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}"
|
|
|
|
@${COMPILE.c} -DSCRT0 ${.CURDIR}/${SRCS} -o ${.TARGET}.o
|
|
|
|
@${LD} -x -r ${.TARGET}.o -o ${.TARGET}
|
|
|
|
@rm -f ${.TARGET}.o
|
1997-05-26 07:55:19 +04:00
|
|
|
.if defined(OBJDIR)
|
|
|
|
@echo install -d ${BUILDDIR}${LIBDIR}
|
|
|
|
@install -d ${BUILDDIR}${LIBDIR}
|
|
|
|
@echo ${BUILDDIR}${LIBDIR}/${.TARGET} '->' `pwd`/${.TARGET};
|
|
|
|
@rm -f ${BUILDDIR}${LIBDIR}/${.TARGET};
|
|
|
|
@ln -s `pwd`/${.TARGET} ${BUILDDIR}${LIBDIR}/${.TARGET};
|
|
|
|
.endif
|
1995-06-05 05:57:04 +04:00
|
|
|
|
1995-09-29 14:23:15 +03:00
|
|
|
.if make(depend)
|
|
|
|
CPPFLAGS+= -DDYNAMIC
|
|
|
|
.endif
|
|
|
|
|
|
|
|
afterdepend: .depend
|
|
|
|
@(TMP=/tmp/_depend$$$$; \
|
|
|
|
sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o s\1.o:/' \
|
|
|
|
< .depend > $$TMP; \
|
|
|
|
mv $$TMP .depend)
|
1993-10-17 01:02:58 +03:00
|
|
|
|
1997-05-29 19:57:45 +04:00
|
|
|
FILES=${OBJS}
|
|
|
|
FILESDIR=/usr/lib
|
|
|
|
|
1993-10-17 01:02:58 +03:00
|
|
|
.include <bsd.prog.mk>
|