kernel/acpica: Clean up the module's .PATH a little bit more.
[dragonfly.git] / gnu / lib / csu / Makefile.csu
1 # $FreeBSD: src/gnu/lib/csu/Makefile,v 1.24 2004/09/10 06:48:04 ru Exp $
2
3 SRCS+=          crtstuff.c
4 HDRS+=          tm.h
5
6 NOBJS=          crtbegin.o crtend.o
7 SOBJS=          crtbeginS.o crtendS.o
8
9 OBJS+=          ${NOBJS} ${SOBJS}
10 INSTALLOBJS+=   ${NOBJS} ${SOBJS}
11
12 OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
13
14 CRTS_CFLAGS=    ${PICFLAG}
15 MKDEP=          -DCRT_BEGIN
16
17 BEGINSRC?=      crtstuff.c
18 ENDSRC?=        crtstuff.c
19
20 ${NOBJS} ${SOBJS}: ${HDRS}
21
22 crtbegin.o:     ${BEGINSRC}
23         ${CC} ${CFLAGS:N-flto} -g0 -DCRT_BEGIN \
24                 -c -o ${.TARGET} ${.ALLSRC:N*.h}
25
26 crtbeginS.o:    ${BEGINSRC}
27         ${CC} ${CFLAGS:N-flto} ${CRTS_CFLAGS} -g0 -DCRT_BEGIN -DCRTSTUFFS_O \
28                 -c -o ${.TARGET} ${.ALLSRC:N*.h}
29
30 crtend.o:       ${ENDSRC}
31         ${CC} ${CFLAGS:N-flto} -g0 -DCRT_END \
32                 -c -o ${.TARGET} ${.ALLSRC:N*.h}
33
34 crtendS.o:      ${ENDSRC}
35         ${CC} ${CFLAGS:N-flto} ${CRTS_CFLAGS} -g0 -DCRT_END -DCRTSTUFFS_O \
36                 -c -o ${.TARGET} ${.ALLSRC:N*.h}
37
38 CLEANFILES+=    tm.h options.h auto-host.h
39 beforedepend: tm.h options.h auto-host.h
40 tm.h: ${CCDIR}/cc_prep/Makefile
41         ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} ${.TARGET}
42
43 options.h:
44         touch ${.TARGET}
45
46 auto-host.h:
47         echo '#include "dragonfly-native.h"' > ${.TARGET}
48
49 all: ${INSTALLOBJS}
50
51 realinstall:
52         ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
53             ${INSTALLOBJS} ${DESTDIR}${TARGET_LIBDIR}
54
55 clean:
56         rm -f ${CLEANFILES} ${OBJS} ${OBJS:S/$/.tmp/}
57
58 .include <bsd.lib.mk>