Changeset b87a5ed for translator/Makefile.in
- Timestamp:
- May 16, 2015, 3:36:19 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- a32b204
- Parents:
- b8508a2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
translator/Makefile.in
rb8508a2 rb87a5ed 1 # This makefile is adapted from Peter Miller's article 2 # "Recursive Make Considered Harmful" 3 # 4 # http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html 1 ######################### -*- Mode: Makefile-Gmake -*- ######################## 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:37:37 2015 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Sat May 16 08:38:52 2015 14 ## Update Count : 2 15 ############################################################################### 5 16 6 MODULES := Common Parser SynTree SymTab ResolvExpr CodeGen ControlStruct GenPoly Tuples InitTweak Designators #Try ArgTweak Explain 17 # This makefile is adapted from Peter Miller's article "Recursive Make Considered Harmful" 18 19 MODULES := Common Parser SynTree SymTab ResolvExpr CodeGen ControlStruct GenPoly Tuples InitTweak Designators # Try ArgTweak Explain 7 20 TARGET := cfa-cpp 8 21 9 all: $ (TARGET)22 all: ${TARGET} 10 23 11 24 # look for include files in each of the modules … … 16 29 # this is the back-end compiler, used to compile libcfa & builtins to link with user code 17 30 BACKEND_CC := @BACKEND_CC@ 18 19 # uncomment the definition of this variable to enable purify20 # (do a "purerun" first)21 #PURIFY := purify --cache-dir=$(HOME)/tmp22 31 23 32 # extra libraries if required … … 31 40 32 41 # include the description for each module 33 include $ (patsubst %,%/module.mk,$(MODULES))42 include ${patsubst %,%/module.mk,${MODULES}} 34 43 35 44 # determine the object files 36 OBJ := $ (patsubst %.cc,%.o,$(filter %.cc,$(SRC)))\37 $ (patsubst %.y,%.tab.o,$(filter %.y,$(SRC)))\38 $ (patsubst %.l,%.yy.o,$(filter %.l,$(SRC)))45 OBJ := ${patsubst %.cc,%.o,${filter %.cc,${SRC}}} \ 46 ${patsubst %.y,%.tab.o,${filter %.y,${SRC}}} \ 47 ${patsubst %.l,%.yy.o,${filter %.l,${SRC}}} 39 48 40 49 # include the C include dependencies 41 DEPS := $ (OBJ:.o=.d)42 -include $ (DEPS)50 DEPS := ${OBJ:.o=.d} 51 -include ${DEPS} 43 52 44 53 # link the program 45 $ (TARGET): $(OBJ)46 $ (PURIFY) $(CXX) -o $@ $(OBJ) $(LIBS)54 ${TARGET}: ${OBJ} 55 ${PURIFY} ${CXX} -o $@ ${OBJ} ${LIBS} 47 56 48 57 #installing 49 install: $ (TARGET)50 $ (INSTALL)-d @CFA_LIBDIR@51 $ (INSTALL) $(TARGET)@CFA_LIBDIR@58 install: ${TARGET} 59 ${INSTALL} -d @CFA_LIBDIR@ 60 ${INSTALL} ${TARGET} @CFA_LIBDIR@ 52 61 53 62 # clean-up rule 54 63 clean: 55 rm -f $ (OBJ) $(DEPS) $(TARGET) tags $(EXTRA_OUTPUT)64 rm -f ${OBJ} ${DEPS} ${TARGET} tags ${EXTRA_OUTPUT} 56 65 find . -name "Expected*" -prune -o \( -name "*.tst" -o -name "report" \) -print | xargs rm -f 57 66 find . -name "core*" -print | xargs rm -f
Note: See TracChangeset
for help on using the changeset viewer.