source:
libcfa/Makefile.in
@
0c7a885
Last change on this file since 0c7a885 was 0c7a885, checked in by , 9 years ago | |
---|---|
|
|
File size: 1.7 KB |
Rev | Line | |
---|---|---|
[0c7a885] | 1 | b######################### -*- Mode: Makefile-Gmake -*- ######################## |
[b87a5ed] | 2 | ## |
3 | ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo | |
4 | ## | |
5 | ## The contents of this file are covered under the licence agreement in the | |
6 | ## file "LICENCE" distributed with Cforall. | |
7 | ## | |
8 | ## Makefile.in -- | |
9 | ## | |
10 | ## Author : Peter A. Buhr | |
11 | ## Created On : Sat May 16 08:05:18 2015 | |
12 | ## Last Modified By : Peter A. Buhr | |
[0c7a885] | 13 | ## Last Modified On : Mon May 25 16:14:54 2015 |
14 | ## Update Count : 7 | |
[b87a5ed] | 15 | ############################################################################### |
16 | ||
[51b7345] | 17 | INSTALL=@INSTALL@ |
18 | BACKEND_CC := @BACKEND_CC@ | |
[76f2e97f] | 19 | CFA_LIBDIR = @CFA_LIBDIR@ |
[51b7345] | 20 | |
[0c7a885] | 21 | LIBRARIES := libcfa.a |
[51b7345] | 22 | |
[0c7a885] | 23 | all : ${LIBRARIES} builtins.cf Makefile |
[51b7345] | 24 | |
[5887db27] | 25 | install : all |
[9df2dd5] | 26 | ${INSTALL} -d @CFA_LIBDIR@ |
27 | ${INSTALL} prelude.cf @CFA_LIBDIR@ | |
28 | ${INSTALL} libcfa.a @CFA_LIBDIR@ | |
[51b7345] | 29 | |
30 | # make forward declarations for gcc builtins | |
[5887db27] | 31 | builtins.cf : builtins.c |
[2bae7307] | 32 | if [ -e builtins.c ] ; then \ |
33 | @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ | |
34 | fi | |
[643a2e1] | 35 | ${INSTALL} builtins.cf @CFA_LIBDIR@ |
[51b7345] | 36 | |
[0c7a885] | 37 | builtins.c : builtins.def prototypes.awk |
[2bae7307] | 38 | if [ -e builtins.def ] ; then \ |
39 | @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ | |
40 | fi | |
41 | ||
42 | builtins.def : | |
[5887db27] | 43 | |
44 | libcfa-prelude.c : @CFA_LIBDIR@/cfa-cpp prelude.cf builtins.cf | |
[df23c8f] | 45 | sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" prelude.cf |
[76f2e97f] | 46 | @CFA_LIBDIR@/cfa-cpp -l prelude.cf $@ |
[3848e0e] | 47 | rm -f prelude.c |
[51b7345] | 48 | |
[5887db27] | 49 | libcfa-prelude.o : libcfa-prelude.c |
[9df2dd5] | 50 | ${BACKEND_CC} -c -o $@ $< |
[51b7345] | 51 | |
[5887db27] | 52 | libcfa.a : libcfa-prelude.o |
[51b7345] | 53 | ar crs $@ $^ |
54 | ||
55 | EXTRA_OUTPUT += libcfa-prelude.o libcfa-prelude.c | |
56 | ||
57 | # clean-up rule | |
[5887db27] | 58 | clean : |
[9df2dd5] | 59 | rm -f ${LIBRARIES} ${EXTRA_OUTPUT} |
[51b7345] | 60 | |
[5887db27] | 61 | distclean : clean |
Note: See TracBrowser
for help on using the repository browser.