######################### -*- 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 : Richard C. Bilson ## Created On : Sat May 16 08:37:37 2015 ## Last Modified By : Peter A. Buhr ## Last Modified On : Thu May 21 21:17:32 2015 ## Update Count : 3 ############################################################################### # This makefile is adapted from Peter Miller's article "Recursive Make Considered Harmful" MODULES := Common Parser SynTree SymTab ResolvExpr CodeGen ControlStruct GenPoly Tuples InitTweak Designators # Try ArgTweak Explain TARGET := cfa-cpp all: ${TARGET} # look for include files in each of the modules CXX := @CXX@ CXXFLAGS += -Wno-deprecated -Wall -g -DDEBUG_ALL -I. -I Common -MMD INSTALL=@INSTALL@ # this is the back-end compiler, used to compile libcfa & builtins to link with user code BACKEND_CC := @BACKEND_CC@ # extra libraries if required LIBS := # each module will add to this SRC := main.cc MakeLibCfa.cc # other things that ought to be cleaned up EXTRA_OUTPUT := core # include the description for each module include ${patsubst %,%/module.mk,${MODULES}} # determine the object files OBJ := ${patsubst %.cc,%.o,${filter %.cc,${SRC}}} \ ${patsubst %.y,%.tab.o,${filter %.y,${SRC}}} \ ${patsubst %.l,%.yy.o,${filter %.l,${SRC}}} # include the C include dependencies DEPS := ${OBJ:.o=.d} -include ${DEPS} # link the program ${TARGET}: ${OBJ} ${PURIFY} ${CXX} -o $@ ${OBJ} ${LIBS} #installing install: ${TARGET} ${INSTALL} -d @CFA_LIBDIR@ ${INSTALL} ${TARGET} @CFA_LIBDIR@ # clean-up rule clean: rm -f ${OBJ} ${DEPS} ${TARGET} tags ${EXTRA_OUTPUT} find . -name "Expected*" -prune -o \( -name "*.tst" -o -name "report" \) -print | xargs rm -f find . -name "core*" -print | xargs rm -f distclean: clean