forked from hwauck/statue-puzzle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
executable file
·60 lines (43 loc) · 1.94 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
50
51
52
53
54
55
56
57
58
59
60
# Changes you will want to make:
# 1) Give a name the program you want to create PROGRAM = myprog.
# 2) Specify all the .cc files after CXX_SRCS
# 3) If you are using a library (such as math function routines)
# adjust CXXLIBS (example: CXXLIBS = -lcc -lm)
# 4) If you want to include any of the book's classes (e.g Time),
# include the corresponding object file after CCC_OBJS
# (in our example ccc_time.o). Note that if you want to use
# cwin, this list must include ccc_x11.o and ccc_shap.o
# 5) Type the Unix command, "touch .depend.mk"
# This will be a "hidden file". To see it type "ls -a" in the shell.
################################################################
# VARIABLES YOU'LL WANT TO CHANGE #
################################################################
PROGRAM = towerDefense
CXX_SRCS = tower.cc EnemyUnit.cc map.cc Square.cc towerDefense.cc path.cc player.cc type.cc \
attributeBox.cc category.cc drawFunctions.cc systemUpdater.cc button.cc towerButton.cc constructionBox.cc \
wave.cc drawConstants.cc gameMaps.cc
CXXLIBS = -lX11
CCC_OBJS = ccc_x11.o ccc_shap.o
################################################################
# STUFF YOU PROBABLY WANT TO LEAVE ALONE #
################################################################
CCC_FILESDIR = cccfiles
CCC_OBJS2 = $(CCC_OBJS:%=$(CCC_FILESDIR)/%)
CXXINCLUDEPATHS = -I$(CCC_FILESDIR)
CXX = g++
CC = $(CXX)
LDFLAGS = -g -pipe -L/usr/X11R6/lib $(CXX_LIBS)
CXXFLAGS = -g -pipe -Wall $(CXXINCLUDEPATHS)
OBJS = $(CXX_SRCS:.cc=.o)
DEMANGLER = c++filt
# The folllowing line is included for Eclipse, since it calls "build all"
all : $(PROGRAM)
$(PROGRAM) : depend $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) $(CCC_OBJS2) $(CXXLIBS) -o $(PROGRAM) 2>&1 \
| $(DEMANGLER)
clean:
/bin/rm -f *.o $(PROGRAM) .nfs* *~ core \#*\#
depend:
$(CXX) -MM $(CXX_SRCS) $(CXXINCLUDEPATHS) > .depend.mk
###
include .depend.mk