source: libcfa/Makefile.in @ 4bf5298

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since 4bf5298 was 643a2e1, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

deal with newer built

  • Property mode set to 100644
File size: 1.0 KB
Line 
1INSTALL=@INSTALL@
2BACKEND_CC := @BACKEND_CC@
3
4LIBRARIES := libcfa.a builtins.cf builtins.c
5
6all: ${LIBRARIES}
7
8install: all
9        ${INSTALL} -d @CFA_LIBDIR@
10        ${INSTALL} prelude.cf @CFA_LIBDIR@
11        ${INSTALL} libcfa.a @CFA_LIBDIR@
12
13# make forward declarations for gcc builtins
14builtins.c: Makefile builtins.def
15        @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@
16
17builtins.cf: builtins.c
18        @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@
19        ${INSTALL} builtins.cf @CFA_LIBDIR@
20
21libcfa-prelude.c: ../translator/cfa-cpp prelude.cf builtins.cf
22        sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" prelude.cf
23        ../translator/cfa-cpp -l prelude.cf $@
24        rm -f prelude.c
25
26libcfa-prelude.o: libcfa-prelude.c
27        ${BACKEND_CC} -c -o $@ $<
28
29libcfa.a: libcfa-prelude.o
30        ar crs $@ $^
31
32EXTRA_OUTPUT += libcfa-prelude.o libcfa-prelude.c
33
34# clean-up rule
35clean:
36        rm -f ${LIBRARIES} ${EXTRA_OUTPUT}
37
38distclean: clean
Note: See TracBrowser for help on using the repository browser.