-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·49 lines (35 loc) · 1.46 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# VIMPL:=EXT
# OUTPUT:=OUTPUT
# BCHECK:=NOBARGINGCHECK
CXX = u++ # compiler
CXXFLAGS = -g -multi -Wall -Wextra -MMD # -D"${BCHECK}" # compiler flags
MAKEFILE_NAME = ${firstword ${MAKEFILE_LIST}} # makefile name
OBJECTS = vendingmachine.o main.o bank.o config.o groupoff.o parent.o printer.o student.o truck.o watcard.o watcardoffice.o bottlingplant.o nameserver.o
EXEC = soda
DEPENDS = ${OBJECTS:.o=.d} # substitute ".o" with ".d"
#############################################################
.PHONY : all clean
all : ${EXEC} # build all executables
${EXEC} : ${OBJECTS}
${CXX} ${CXXFLAGS} $^ -o $@
# -include SodaImpl
# ifeq (${shell if [ "${LOCKVIMPL}" = "${VIMPL}" -a "${OUTPUTTYPE}" = "${OUTPUT}" -a \
# "${BCHECKIMPL}" = "${BCHECK}" ] ; then echo true ; fi },true)
# ${EXEC} : ${OBJECTS}
# ${CXX} ${CXXFLAGS} $^ -o $@
# else # implementation type has changed => rebuilt
# .PHONY : ${EXEC}
# ${EXEC} :
# rm -f SodaImpl
# touch q2tallyVotes.h
# ${MAKE} ${EXEC} VIMPL="${VIMPL}" OUTPUT="${OUTPUT}" BCHECK="${BCHECK}"
# endif
# SodaImpl :
# echo "LOCKVIMPL=${VIMPL}\nOUTPUTTYPE=${OUTPUT}\nBCHECKIMPL=${BCHECK}" > SodaImpl
# sleep 1
# #############################################################
${OBJECTS} : ${MAKEFILE_NAME} # OPTIONAL : changes to this file => recompile
-include ${DEPENDS} # include *.d files containing program dependences
clean : # remove files that can be regenerated
rm -f *.d ${OBJECTS} ${EXEC}
# SodaImpl # in line above