######################### -*- Mode: Makefile-Gmake -*- ######################## ## ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo ## ## The contents of this file are covered under the licence agreement in the ## file "LICENCE" distributed with Cforall. ## ## Makefile.in -- ## ## Author : Peter A. Buhr ## Created On : Sat May 16 08:05:18 2015 ## Last Modified By : Peter A. Buhr ## Last Modified On : Sat May 16 08:06:05 2015 ## Update Count : 1 ############################################################################### INSTALL=@INSTALL@ BACKEND_CC := @BACKEND_CC@ LIBRARIES := libcfa.a builtins.cf builtins.c all: ${LIBRARIES} install: all ${INSTALL} -d @CFA_LIBDIR@ ${INSTALL} prelude.cf @CFA_LIBDIR@ ${INSTALL} libcfa.a @CFA_LIBDIR@ # make forward declarations for gcc builtins builtins.c: Makefile builtins.def @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ builtins.cf: builtins.c @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ${INSTALL} builtins.cf @CFA_LIBDIR@ libcfa-prelude.c: ../translator/cfa-cpp prelude.cf builtins.cf sed -i -e "s#typedef.*ptrdiff_t.*#`@BACKEND_CC@ -E ptrdiff_t.c | grep 'typedef.*ptrdiff_t'`#" prelude.cf ../translator/cfa-cpp -l prelude.cf $@ rm -f prelude.c libcfa-prelude.o: libcfa-prelude.c ${BACKEND_CC} -c -o $@ $< libcfa.a: libcfa-prelude.o ar crs $@ $^ EXTRA_OUTPUT += libcfa-prelude.o libcfa-prelude.c # clean-up rule clean: rm -f ${LIBRARIES} ${EXTRA_OUTPUT} distclean: clean