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