######################### -*- 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 : Mon May 25 16:22:36 2015 ## Update Count : 9 ############################################################################### INSTALL=@INSTALL@ BACKEND_CC := @BACKEND_CC@ CFA_LIBDIR = @CFA_LIBDIR@ LIBRARIES := libcfa.a all : ${LIBRARIES} builtins.cf Makefile install : all ${INSTALL} -d @CFA_LIBDIR@ ${INSTALL} prelude.cf @CFA_LIBDIR@ ${INSTALL} libcfa.a @CFA_LIBDIR@ # make forward declarations for gcc builtins builtins.cf : builtins.c @if [ -e builtins.c ] ; then \ @BACKEND_CC@ -E -P $^ | sed -e "/targetm/s/.*//" -e "/_Decimal/s/.*//" -e "s/void (const char \*)0();//" -e "s/\"//g" -e "s/\(__builtin_\) /\1/" > $@ ; \ fi ${INSTALL} builtins.cf @CFA_LIBDIR@ builtins.c : builtins.def prototypes.awk @if [ -e builtins.def ] ; then \ @BACKEND_CC@ -E prototypes.c | awk -f prototypes.awk > $@ ; \ fi builtins.def : libcfa-prelude.c : @CFA_LIBDIR@/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 @CFA_LIBDIR@/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