Fix -j builds for gcc-3.4. The .nx build in cc_tools was breaking
[dragonfly.git] / gnu / lib / gcc34 / libgcc / Makefile
1 # $DragonFly: src/gnu/lib/gcc34/libgcc/Makefile,v 1.4 2004/06/21 21:49:11 dillon Exp $
2
3 .include "../Makefile.inc"
4 .include "${STOPDIR}/cc_tools/Makefile.tools"
5
6 CFLAGS+=        -I.
7 CFLAGS+=        -fexceptions
8 CFLAGS+=        -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DHAVE_GTHR_DEFAULT
9 CFLAGS+=        -DIN_GCC
10
11 LIB=            gcc
12
13 # used by shared libs
14 INSTALL_PIC_ARCHIVE=    yes
15
16 FUNCS=          __gcc_bcmp __main _absvdi2 _absvsi2 _addvdi3 _addvsi3
17 FUNCS+=         _ashldi3 _ashrdi3 _clear_cache _clz _clzdi2 _clzsi2
18 FUNCS+=         _cmpdi2 _ctors _ctzdi2 _ctzsi2 _divdi3 _eprintf _ffsdi2
19 FUNCS+=         _ffssi2 _fixdfdi _fixsfdi _fixtfdi _fixunsdfdi _fixunsdfsi
20 FUNCS+=         _fixunssfdi _fixunssfsi _fixunstfdi _fixunsxfdi _fixunsxfsi
21 FUNCS+=         _fixxfdi _floatdidf _floatdisf _floatditf _floatdixf _gcov
22 FUNCS+=         _gcov_merge_add _gcov_merge_delta _gcov_merge_single _lshrdi3
23 FUNCS+=         _moddi3 _muldi3 _mulvdi3 _mulvsi3 _negdi2 _negvdi2
24 FUNCS+=         _negvsi2 _paritydi2 _paritysi2 _popcount_tab _popcountdi2
25 FUNCS+=         _popcountsi2 _subvdi3 _subvsi3 _trampoline _ucmpdi2
26 FUNCS+=         _udiv_w_sdiv _udivdi3 _udivmoddi4 _umoddi3
27
28 SRCS+=          ${FUNCS:S/$/.c/g}
29 CLEANFILES+=    ${FUNCS:S/$/.c/g}
30 SRCS+=          gthr-gnat.c unwind-c.c unwind-dw2-fde.c unwind-dw2.c
31 SRCS+=          unwind-sjlj.c
32 SRCS+=          insn-flags.h insn-constants.h
33
34
35 .for F in ${FUNCS}
36 ${F}.c:
37         echo '#define L${.TARGET:T:R}' > ${.TARGET}
38         echo '#include "libgcc2.c"' >> ${.TARGET}
39 .endfor
40
41 .for F in _moddi3.c _udivdi3.c _umoddi3.c _udivmoddi4.c
42 ${F:R:S/$/.o/}: ${F}
43         ${CC} ${CFLAGS} -fnon-call-exceptions -c ${.IMPSRC}
44 .endfor
45
46 depend: cc_prep cc_tools
47 .ORDER: cc_prep cc_tools ${SRCS}
48
49 # This is kinda messy, but it's easier then rearranging the top level
50 # build.  gcc-3.4's libgcc generates source files which depend on generated
51 # header files, which means we have to generate our tools set before
52 # we can build libgcc.  The toolset is normally built afterwords.
53 #
54 # XXX for the world stage we could theoretically use the cc_tools generated
55 # in the btools stage, but it's easier to regenerate them.
56 #
57 cc_prep: .PHONY
58         cd ${STOPDIR}/cc_prep; ${MAKE} depend
59
60 cc_tools: .PHONY
61         cd ${STOPDIR}/cc_tools; ${MAKE} depend
62
63 .include <bsd.lib.mk>