summaryrefslogtreecommitdiff
path: root/server/src/Makefile.am
blob: 99863f0f41cf020bf213caf18e7f1bbf9ca70c20 (plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164

bin_PROGRAMS = pracrod macrotool

pracrod_LDADD = $(LD_EFENCE) $(PQXX_LIBS) $(CONFIG_LIBS) $(LUA_LIBS) -lpthread

pracrod_CXXFLAGS = $(PQXX_CXXFLAGS) $(CONFIG_CXXFLAGS) $(LUA_CXXFLAGS)

pracrod_SOURCES = \
	pracrod.cc \
	daemon.cc \
	database.cc \
	configuration.cc \
	configurationparser.cc \
	debug.cc \
	exception.cc \
	queryhandlerpentominos.cc \
	queryhandlerpracro.cc \
	queryparser.cc \
	journal_commit.cc \
	log.cc \
	luaquerymapper.cc \
	luaresume.cc \
	macroheaderparser.cc \
	macrolist.cc \
	macroparser.cc \
	pracrodao.cc \
	pracrodaopgsql.cc \
	resumeparser.cc \
	saxparser.cc \
	server.cc \
	templateparser.cc \
	transactionparser.cc \
	tcpsocket.cc \
	utf8.cc \
	version.cc \
	widgetgenerator.cc \
	xml_encode_decode.cc

macrotool_LDADD = $(LD_EFENCE) $(PQXX_LIBS) $(CONFIG_LIBS) $(LUA_LIBS) -lpthread

macrotool_CXXFLAGS = $(PQXX_CXXFLAGS) $(CONFIG_CXXFLAGS) $(LUA_CXXFLAGS)

macrotool_SOURCES = \
	macrotool.cc \
	debug.cc \
	configuration.cc \
	configurationparser.cc \
	database.cc \
	exception.cc \
	log.cc \
	macroheaderparser.cc \
	macrolist.cc \
	macroparser.cc \
	macrotool_dump.cc \
	macrotool_fieldnames.cc \
	macrotool_filehandler.cc \
	macrotool_util.cc \
	pracrodao.cc \
	pracrodaopgsql.cc \
	saxparser.cc \
	templateparser.cc \
	version.cc

EXTRA_DIST = \
	configuration.h \
	configurationparser.h \
	daemon.h \
	database.h \
	dbtypes.h \
	debug.h \
	exception.h \
	queryhandler.h \
	queryhandlerpentominos.h \
	queryhandlerpracro.h \
	queryparser.h \
	journal_commit.h \
	log.h \
	luaquerymapper.h \
	luaresume.h \
	macroheaderparser.h \
	macrolist.h \
	macroparser.h \
	macrotool_dump.h \
	macrotool_fieldnames.h \
	macrotool_filehandler.h \
	macrotool_util.h \
	pracrodao.h \
	pracrodaopgsql.h \
	resumeparser.h \
	saxparser.h \
	server.h \
	templateparser.h \
	transactionparser.h \
	tcpsocket.h \
	utf8.h \
	version.h \
	widgetgenerator.h \
	xml_encode_decode.h

TESTFILES = \
	test_version \
	test_macrolist \
	test_queryhandlerpentominos \
	test_queryhandlerpracro \
	test_queryparser \
	test_luaquerymapper \
	test_templateparser \
	test_server \
	test_pracrodaopgsql \
	test_macroparser \
	test_xml_encode_decode \
	test_journal_commit


TESTLOGS = `for F in ${TESTFILES}; do echo $$F.log; done`

BASICS = "-I.. -DHAVE_CONFIG_H exception.cc log.cc debug.cc configuration.cc utf8.cc"
PARSERBASICS = "saxparser.cc -lexpat"
DBBASICS = "database.cc pracrodao.cc pracrodaopgsql.cc $(PQXX_LIBS) $(PQXX_CXXFLAGS)"

test: $(TESTFILES)
	@echo "All tests done."

test_clean:
	rm -f $(TESTFILES)

test_version: version.cc
	@../../tools/test version.cc

test_macrolist: macrolist.cc
	@../../tools/test macrolist.cc version.cc macroheaderparser.cc $(PARSERBASICS) $(BASICS)

test_queryhandlerpentominos: queryhandlerpentominos.cc
	@../../tools/test queryhandlerpentominos.cc tcpsocket.cc queryparser.cc $(PARSERBASICS) $(BASICS)

test_queryhandlerpracro: queryhandlerpracro.cc
	@../../tools/test queryhandlerpracro.cc tcpsocket.cc queryparser.cc $(DBBASICS) $(PARSERBASICS) $(BASICS)

test_queryparser: queryparser.cc
	@../../tools/test queryparser.cc queryhandlerpentominos.cc tcpsocket.cc $(BASICS) $(PARSERBASICS)

test_luaquerymapper: luaquerymapper.cc
	@../../tools/test luaquerymapper.cc queryparser.cc queryhandlerpentominos.cc tcpsocket.cc $(BASICS) $(PARSERBASICS) $(LUA_LIBS)

test_templateparser: templateparser.cc
	@../../tools/test templateparser.cc $(PARSERBASICS) $(BASICS)

test_macroparser: macroparser.cc
	@../../tools/test macroparser.cc $(PARSERBASICS) $(BASICS)

test_server: server.cc
	@../../tools/test server.cc templateparser.cc queryparser.cc queryhandlerpentominos.cc journal_commit.cc macrolist.cc queryhandlerpracro.cc macroheaderparser.cc version.cc resumeparser.cc luaquerymapper.cc tcpsocket.cc $(BASICS) transactionparser.cc widgetgenerator.cc database.cc pracrodao.cc pracrodaopgsql.cc luaresume.cc macroparser.cc xml_encode_decode.cc $(PARSERBASICS) $(LUA_LIBS) $(CONFIG_LIBS) $(PQXX_LIBS) $(PQXX_CXXFLAGS)
	@sleep 1s; killall -9 test_server

test_pracrodaopgsql: pracrodaopgsql.cc
	@../../tools/test pracrodaopgsql.cc pracrodao.cc $(BASICS) $(PQXX_LIBS) $(PQXX_CXXFLAGS) -I..

test_xml_encode_decode: xml_encode_decode.cc
	@../../tools/test xml_encode_decode.cc

test_journal_commit: journal_commit.cc
	@../../tools/test journal_commit.cc templateparser.cc $(PARSERBASICS) $(BASICS)

CLEANFILES = $(TESTFILES) $(TESTLOGS) *~