source: translator/examples/Makefile.in @ ad17ba6a

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 ad17ba6a was ad17ba6a, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

generalize example Makefile

  • Property mode set to 100644
File size: 1.0 KB
Line 
1CC := @CFA_BINDIR@/cfa
2CFLAGS = -g -Wall -Wunused-function -MMD
3MAKEFILE_NAME = ${firstword ${MAKEFILE_LIST}}   # makefile name
4
5OBJECTS1 = iostream.o fstream.o fstream_test.o
6EXEC1 = fstream_test
7
8OBJECTS2 = vector_int.o fstream.o iostream.o array.o iterator.o vector_test.o
9EXEC2 = vector_test
10
11OBJECTS = ${OBJECTS1} ${OBJECTS2}               # all object files
12DEPENDS = ${OBJECTS:.o=.d}                      # substitute ".o" with ".d"
13EXECS = ${EXEC1} ${EXEC2}                       # all executables
14
15########## Targets ##########
16
17.PHONY : all clean                              # not file names
18
19all : ${EXECS}                                  # build all executables
20
21${EXEC1} : ${OBJECTS1}                          # link step 1st executable
22        ${CC} ${CFLAGS} $^ -o $@                # additional object files before $^
23
24${EXEC2} : ${OBJECTS2}                          # link step 2nd executable
25        ${CC} ${CFLAGS} $^ -o $@                # additional object files before $^
26
27${OBJECTS} : ${MAKEFILE_NAME}                   # OPTIONAL : changes to this file => recompile
28
29-include ${DEPENDS}                             # include *.d files containing program dependences
30
31clean :                                         # remove files that can be regenerated
32        rm -f ${DEPENDS} ${OBJECTS} ${EXECS} *.class
33
34distclean : clean
Note: See TracBrowser for help on using the repository browser.