source: translator/Makefile.in @ b8508a2

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since b8508a2 was 51b7345, checked in by Peter A. Buhr <pabuhr@…>, 10 years ago

initial commit

  • Property mode set to 100644
File size: 1.6 KB
Line 
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
5
6MODULES := Common Parser SynTree SymTab ResolvExpr CodeGen ControlStruct GenPoly Tuples InitTweak Designators #Try ArgTweak Explain
7TARGET := cfa-cpp
8
9all: $(TARGET)
10
11# look for include files in each of the modules
12CXX := @CXX@
13CXXFLAGS += -Wno-deprecated -Wall -g -DDEBUG_ALL -I. -I Common -MMD
14INSTALL=@INSTALL@
15
16# this is the back-end compiler, used to compile libcfa & builtins to link with user code
17BACKEND_CC := @BACKEND_CC@
18
19# uncomment the definition of this variable to enable purify
20#  (do a "purerun" first)
21#PURIFY := purify --cache-dir=$(HOME)/tmp
22
23# extra libraries if required
24LIBS :=
25
26# each module will add to this
27SRC := main.cc MakeLibCfa.cc
28
29# other things that ought to be cleaned up
30EXTRA_OUTPUT := core
31
32# include the description for each module
33include $(patsubst %,%/module.mk,$(MODULES))
34
35# determine the object files
36OBJ := $(patsubst %.cc,%.o,$(filter %.cc,$(SRC))) \
37       $(patsubst %.y,%.tab.o,$(filter %.y,$(SRC))) \
38       $(patsubst %.l,%.yy.o,$(filter %.l,$(SRC)))
39
40# include the C include dependencies
41DEPS := $(OBJ:.o=.d)
42-include $(DEPS)
43
44# link the program
45$(TARGET): $(OBJ)
46        $(PURIFY) $(CXX) -o $@ $(OBJ) $(LIBS)
47
48#installing
49install: $(TARGET)
50        $(INSTALL) -d @CFA_LIBDIR@
51        $(INSTALL) $(TARGET) @CFA_LIBDIR@
52
53# clean-up rule
54clean:
55        rm -f $(OBJ) $(DEPS) $(TARGET) tags $(EXTRA_OUTPUT)
56        find . -name "Expected*" -prune -o \( -name "*.tst" -o -name "report" \) -print | xargs rm -f
57        find . -name "core*" -print | xargs rm -f
58
59distclean: clean
Note: See TracBrowser for help on using the repository browser.