root/ggpa/Makefile

Revision 1, 7.0 kB (checked in by pantley2, 4 years ago)

GGPA code from the good old days of SIGART

Line 
1 #*********************************************************************
2 #  General Game Player Makefile
3 #*********************************************************************
4
5 #*********************************************************************
6 # Add any new objects to this list.  Put a .o at the end of the class name
7 # Remember to add a rule to compile the object below. Test classes should
8 # not be added here
9
10 OBJS = State.o Action.o GameWorld.o SentenceStructure.o Sentence.o \
11         QNeuralNetwork.o Utils.o VariableAssignmentIterator.o QLearner.o \
12         main.o
13
14
15 #*********************************************************************
16 # This is the name of the executable.  Do not modify.
17
18 EXENAME = ggppa
19
20 #*********************************************************************
21 # Default command line arguments for the executable.  If you are going
22 # to experiment with the command line arguments, please do not do it by
23 # changing these values.
24
25 ARGS =
26
27 #**************************************************************************
28 # Add any new tests to this list.  Just put the test name here, and add a rule
29 # to run the test in the section below
30
31 TESTS = TestGameWorld TestSentenceStructure TestSentence TestState TestAction \
32 TestQNeuralNetwork TestVariableAssignmentIterator
33 TESTOBJS = TestGameWorld.o TestSentenceStructure.o TestSentence.o TestState.o \
34 TestAction.o TestQNeuralNetwork.o TestVariableAssignmentIterator.o
35
36 #**************************************************************************
37 # A macro to identify the standard test tools object to include in the
38 # executables for tests
39 TESTTOOLS = TestTools.o
40
41 #**************************************************************************
42 # Macros defining the C/C++ compiler and linker.
43
44 CC = g++
45 CCOPTS = -c -g -Wall -Wshadow
46 LINK = g++
47 LINKOPTS = -o
48 LINKPOSTOPTS = -lm -lfann -L/afs/acm.uiuc.edu/user/bzheng2/Public/ggpa/fann
49
50 #**************************************************************************
51 # Rule for linking the objects and creating an executable
52
53 $(EXENAME): $(OBJS)
54         $(LINK) $(LINKOPTS) $(EXENAME) $(OBJS) \
55         $(LINKPOSTOPTS)
56
57
58 #**************************************************************************
59 # Rule to create object files only; no linky.
60
61 objonly: $(OBJS)
62
63 #**************************************************************************
64 # Rules for compling the classes.  Add new rules for each new object and
65 # test class added
66
67 State.o: State.h State.cpp Sentence.o
68         $(CC) $(CCOPTS) State.cpp
69
70 Action.o: Action.h Action.cpp Sentence.o
71         $(CC) $(CCOPTS) Action.cpp
72
73 GameWorld.o: GameWorld.h GameWorld.cpp Utils.o Sentence.o SentenceStructure.o \
74         Action.o State.o VariableAssignmentIterator.o
75         $(CC) $(CCOPTS) GameWorld.cpp
76
77 Table.o: Table.h Table.cpp QFunction.h StateActionCmp.h
78         $(CC) $(CCOPTS) Table.cpp
79
80 TestGameWorld.o: GameWorld.o TestGameWorld.cpp TestTools.o
81         $(CC) $(CCOPTS) TestGameWorld.cpp
82
83 TestTools.o: TestTools.cpp TestTools.h
84         $(CC) $(CCOPTS) TestTools.cpp
85
86 SentenceStructure.o: SentenceStructure.h SentenceStructure.cpp
87         $(CC) $(CCOPTS) SentenceStructure.cpp
88
89 TestSentenceStructure.o: TestSentenceStructure.cpp SentenceStructure.o \
90         TestTools.o
91         $(CC) $(CCOPTS) TestSentenceStructure.cpp
92
93 TestTable.o: TestTable.cpp TestTools.o
94         $(CC) $(CCOPTS) TestTable.cpp
95
96 Sentence.o: Sentence.h Sentence.cpp SentenceStructure.o Utils.o
97         $(CC) $(CCOPTS) Sentence.cpp
98
99 TestSentence.o: Sentence.o TestSentence.cpp TestTools.o
100         $(CC) $(CCOPTS) TestSentence.cpp
101
102 TestState.o: State.o TestState.cpp TestTools.o
103         $(CC) $(CCOPTS) TestState.cpp
104
105 QNeuralNetwork.o: QNeuralNetwork.h QNeuralNetwork.cpp QFunction.h
106         $(CC) $(CCOPTS) QNeuralNetwork.cpp
107
108 TestAction.o: Action.o TestAction.cpp TestTools.o
109         $(CC) $(CCOPTS) TestAction.cpp
110
111 TestQNeuralNetwork.o: QNeuralNetwork.o TestQNeuralNetwork.cpp TestTools.o \
112         State.o Action.o Sentence.o SentenceStructure.o
113         $(CC) $(CCOPTS) TestQNeuralNetwork.cpp
114
115 Utils.o: Utils.h Utils.cpp
116         $(CC) $(CCOPTS) Utils.cpp
117
118 VariableAssignmentIterator.o: VariableAssignmentIterator.h \
119         VariableAssignmentIterator.cpp
120         $(CC) $(CCOPTS) VariableAssignmentIterator.cpp
121
122
123 QLearner.o: QLearner.h QLearner.cpp GameWorld.o QFunction.h QNeuralNetwork.o \
124         State.o Sentence.o Action.o SentenceStructure.o Utils.o \
125         VariableAssignmentIterator.o
126         $(CC) $(CCOPTS) QLearner.cpp
127
128 ActQNetwork.o: ActQNetwork.h ActQNetwork.cpp
129         $(CC) $(CCOPTS) ActQNetwork.cpp
130
131 TestVariableAssignmentIterator.o: VariableAssignmentIterator.o \
132         TestVariableAssignmentIterator.cpp
133         $(CC) $(CCOPTS) TestVariableAssignmentIterator.cpp
134
135 main.o: main.cpp QLearner.o GameWorld.o
136         $(CC) $(CCOPTS) main.cpp
137
138 #**************************************************************************
139 # Rule to run the executable with the default arguments
140
141 run: $(EXENAME)
142         ./$(EXENAME) $(ARGS)
143
144 #**************************************************************************
145 # rule to run all tests
146 runTests: $(TESTS)
147
148 #**************************************************************************
149 # rules for builing the executable for each test
150
151 TestGameWorld.exe: TestGameWorld.o
152         $(LINK) $(LINKOPTS) TestGameWorld $(TESTTOOLS) TestGameWorld.o GameWorld.o \
153         Sentence.o SentenceStructure.o Action.o Utils.o State.o \
154         VariableAssignmentIterator.o
155
156 TestSentenceStructure.exe: TestSentenceStructure.o
157         $(LINK) $(LINKOPTS) TestSentenceStructure $(TESTTOOLS) \
158         TestSentenceStructure.o SentenceStructure.o
159
160 TestSentence.exe: TestSentence.o
161         $(LINK) $(LINKOPTS) TestSentence $(TESTTOOLS) \
162         TestSentence.o Sentence.o SentenceStructure.o Utils.o
163
164 TestTable.exe: TestTable.o Table.o TestTools.o State.o Action.o Sentence.o \
165         SentenceStructure.o
166         $(LINK) $(LINKOPTS) TestTable $(TESTTOOLS) TestTable.o Table.o State.o \
167         Action.o Sentence.o SentenceStructure.o
168
169 TestState.exe: TestState.o
170         $(LINK) $(LINKOPTS) TestState $(TESTTOOLS) TestState.o State.o Sentence.o \
171         SentenceStructure.o Utils.o
172
173 TestAction.exe: TestAction.o
174         $(LINK) $(LINKOPTS) TestAction $(TESTTOOLS) TestAction.o Action.o \
175         Sentence.o SentenceStructure.o Utils.o
176
177 TestQNeuralNetwork.exe: TestQNeuralNetwork.o
178         $(LINK) $(LINKOPTS) TestQNeuralNetwork $(TESTTOOLS) TestQNeuralNetwork.o \
179         Action.o State.o Sentence.o SentenceStructure.o QNeuralNetwork.o Utils.o \
180         $(LINKPOSTOPTS)
181
182 TestVariableAssignmentIterator.exe: TestVariableAssignmentIterator.o
183         $(LINK) $(LINKOPTS) TestVariableAssignmentIterator $(TESTTOOLS) \
184         TestVariableAssignmentIterator.o VariableAssignmentIterator.o
185
186 #**************************************************************************
187 # rules for runing each test
188
189 TestGameWorld: TestGameWorld.exe
190         ./TestGameWorld
191
192 TestSentence: TestSentence.exe
193         ./TestSentence
194
195 TestSentenceStructure: TestSentenceStructure.exe
196         ./TestSentenceStructure
197
198 TestTable: TestTable.exe
199         ./TestTable
200
201 TestState: TestState.exe
202         ./TestState
203
204 TestAction: TestAction.exe
205         ./TestAction
206
207 TestQNeuralNetwork: TestQNeuralNetwork.exe
208         ./TestQNeuralNetwork
209
210 TestVariableAssignmentIterator: TestVariableAssignmentIterator.exe
211         ./TestVariableAssignmentIterator
212
213 #**************************************************************************
214 # Rule to delete .o files and the executable
215
216 clean:
217         rm $(EXENAME) *.o $(TESTS)
Note: See TracBrowser for help on using the browser.