Create startup files from the GCC sources and drop our versions.
[dragonfly.git] / gnu / lib / gcc40 / libgcc / Makefile
1 # $DragonFly: src/gnu/lib/gcc40/libgcc/Attic/Makefile,v 1.1 2005/06/05 22:43:21 corecode 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=  _eprintf __gcc_bcmp \
17         _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 \
18         _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi \
19         _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi \
20         _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf _clear_cache \
21         _enable_execute_stack _trampoline __main _absvsi2 _absvdi2 _addvsi3 \
22         _addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2 _ctors \
23         _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2 _popcount_tab \
24         _popcountsi2 _popcountdi2 _paritysi2 _paritydi2 _powisf2 _powidf2 \
25         _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 \
26         _divxc3 _divtc3 \
27         _divdi3 _moddi3 _udivdi3 _umoddi3 _udiv_w_sdiv _udivmoddi4
28
29 SRCS+=          ${FUNCS:S/$/.c/g}
30 CLEANFILES+=    ${FUNCS:S/$/.c/g}
31 SRCS+=          gthr-gnat.c unwind-c.c unwind-dw2-fde.c unwind-dw2.c
32 SRCS+=          unwind-sjlj.c
33 SRCS+=          insn-flags.h insn-constants.h
34
35
36 .for F in ${FUNCS}
37 ${F}.c:
38         echo '#define L${.TARGET:T:R}' > ${.TARGET}
39         echo '#include "libgcc2.c"' >> ${.TARGET}
40 .endfor
41
42 .for F in _divdi3.c _moddi3.c _udivdi3.c _umoddi3.c _udiv_w_sdiv.c _udivmoddi4.c
43 ${F:R:S/$/.o/}: ${F}
44         ${CC} ${CFLAGS} -fnon-call-exceptions -c ${.IMPSRC}
45 .endfor
46
47 depend: cc_prep cc_tools
48 .ORDER: cc_prep cc_tools ${SRCS}
49
50 # This is kinda messy, but it's easier then rearranging the top level
51 # build.  gcc-4.0's libgcc generates source files which depend on generated
52 # header files, which means we have to generate our tools set before
53 # we can build libgcc.  The toolset is normally built afterwards.
54 #
55 # XXX for the world stage we could theoretically use the cc_tools generated
56 # in the btools stage, but it's easier to regenerate them.
57 #
58 cc_prep: .PHONY
59         cd ${STOPDIR}/cc_prep; ${MAKE} depend
60
61 cc_tools: .PHONY
62         cd ${STOPDIR}/cc_tools; ${MAKE} depend
63
64 .if ${MACHINE_ARCH} == "i386"
65 .PATH: ${GCCDIR}/gcc/config/i386
66
67 INCS=   emmintrin.h mmintrin.h pmmintrin.h xmmintrin.h
68 INCSDIR=        /usr/libdata/gcc40
69 .endif
70
71 .include <bsd.lib.mk>