xref: /freebsd/lib/csu/i386/Makefile (revision a8445737e740901f5f2c8d24c12ef7fc8b00134e)
1#	from: @(#)Makefile	5.6 (Berkeley) 5/22/91
2#	$Id: Makefile,v 1.37 1998/05/26 20:12:52 sos Exp $
3
4CFLAGS+=        -DLIBC_SCCS -fno-omit-frame-pointer
5OBJS=		crt0.o c++rt0.o gcrt0.o scrt0.o sgcrt0.o
6CLEANFILES+=	a.out
7
8all: ${OBJS}
9
10crt0.o: crt0.c
11	${CC} ${CFLAGS} -c -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
12	${LD} -O ${.TARGET} -x -r ${.TARGET}
13
14c++rt0.o: c++rt0.c
15	${CC} ${CFLAGS} -fpic -c ${.CURDIR}/c++rt0.c
16	@${LD} -O ${.TARGET} -x -r ${.TARGET}
17
18#
19# gcrt0.o doesn't really depend on crt0.o, but this is the easiest way
20# to get the dependencies mostly correct.
21#
22gcrt0.o: crt0.o
23	${CC} ${CFLAGS} -c -DMCRT0 -DDYNAMIC ${.CURDIR}/crt0.c -o ${.TARGET}
24	${LD} -O ${.TARGET} -x -r ${.TARGET}
25
26# dependencies fudged as for gcrt0.o
27scrt0.o: crt0.o
28	${CC} ${CFLAGS} -c -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
29	${LD} -O ${.TARGET} -x -r ${.TARGET}
30
31# dependencies fudged as for gcrt0.o
32sgcrt0.o: scrt0.o
33	${CC} ${CFLAGS} -c -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
34	${LD} -O ${.TARGET} -x -r ${.TARGET}
35
36realinstall:
37	${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
38		${DESTDIR}${LIBDIR}
39
40depend:	.depend
41
42.depend:	crt0.c c++rt0.c
43	rm -f .depend
44	mkdep ${CFLAGS} -DCRT0 -DDYNAMIC ${.CURDIR}/crt0.c
45	mkdep -a ${CFLAGS} ${.CURDIR}/c++rt0.c
46
47lint tags:
48
49.include <bsd.prog.mk>
50