diff options
Diffstat (limited to 'src/tests/Makefile')
-rw-r--r-- | src/tests/Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/tests/Makefile b/src/tests/Makefile new file mode 100644 index 0000000..978167f --- /dev/null +++ b/src/tests/Makefile | |||
@@ -0,0 +1,45 @@ | |||
1 | OBJ=StringUtiltest.o ../StringUtil.o | ||
2 | CXX=g++ | ||
3 | CXXFLAGS= -I.. -DDEBUG -Wall -g -O2 | ||
4 | LIBS= | ||
5 | XFLAGS= -I/usr/X11R6/include | ||
6 | XLIBS= -L/usr/X11R6/lib -lX11 | ||
7 | COMPILEFILE=$(CXX) -c $(CXXFLAGS) | ||
8 | |||
9 | all: testStringUtil testKeys testResource testSignal | ||
10 | |||
11 | .cc.o: | ||
12 | $(CXX) -c $(CXXFLAGS) $< | ||
13 | |||
14 | StringUtil.o: ../StringUtil.cc ../StringUtil.hh | ||
15 | $(CXX) -c $(CXXFLAGS) ../StringUtil.cc -o StringUtil.o | ||
16 | |||
17 | Keys.o: ../Keys.cc ../Keys.hh | ||
18 | $(CXX) -c $(CXXFLAGS) $(XFLAGS) ../Keys.cc -o Keys.o | ||
19 | |||
20 | Resource.o: ../Resource.cc ../Resource.hh | ||
21 | $(CXX) -c $(CXXFLAGS) $(XFLAGS) ../Resource.cc -o Resource.o | ||
22 | |||
23 | ../SignalHandler.o: | ||
24 | ${COMPILEFILE} ../SignalHandler.cc -o ../SignalHandler.o | ||
25 | |||
26 | testStringUtil: StringUtiltest.o StringUtil.o | ||
27 | $(CXX) $(LIBS) StringUtiltest.o StringUtil.o -o testStringUtil | ||
28 | |||
29 | testKeys: Keys.o testKeys.o StringUtil.o | ||
30 | $(CXX) $(LIBS) $(XLIBS) StringUtil.o Keys.o testKeys.o -o testKeys | ||
31 | |||
32 | testResource: Resourcetest.o Resource.o | ||
33 | ${CXX} ${LIBS} ${XLIBS} Resourcetest.o Resource.o -o testResource | ||
34 | |||
35 | testSignal: signaltest.cc ../SignalHandler.o | ||
36 | ${CXX} ${LIBS} signaltest.cc ../SignalHandler.o -o testSignal | ||
37 | |||
38 | |||
39 | run: testResource testKeys testStringUtil | ||
40 | ./testKeys | ||
41 | ./testStringUtil | ||
42 | ./testResource | ||
43 | ./testSignal | ||
44 | clean: | ||
45 | rm -f *.o | ||