summaryrefslogtreecommitdiff
path: root/server/src/Makefile.am
blob: c21b8143e99a5fe634ba7cfb9f597da460c2a6d8 (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

bin_PROGRAMS = pracrod

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 \
	exception.cc \
	queryhandler.cc \
	queryparser.cc \
	journal_commit.cc \
	log.cc \
	luaquerymapper.cc \
	resumeparser.cc \
	saxparser.cc \
	server.cc \
	templateparser.cc \
	transactionparser.cc \
	tcpsocket.cc \
	widgetgenerator.cc

EXTRA_DIST = \
	configuration.h \
	daemon.h \
	database.h \
	debug.h \
	exception.h \
	queryhandler.h \
	queryparser.h \
	journal_commit.h \
	log.h \
	luaquerymapper.h \
	resumeparser.h \
	saxparser.h \
	server.h \
	templateparser.h \
	transactionparser.h \
	tcpsocket.h \
	widgetgenerator.h

TESTFILES = \
	test_queryhandler \
	test_queryparser \
	test_luaquerymapper \
	test_templateparser \
	test_server \
	test_database

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

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

test_clean:
	rm -f $(TESTFILES)

test_queryhandler: queryhandler.cc
	@../../tools/test queryhandler.cc tcpsocket.cc exception.cc uid.cc log.cc

test_queryparser: queryparser.cc
	@../../tools/test queryparser.cc queryhandler.cc tcpsocket.cc exception.cc uid.cc log.cc saxparser.cc -lexpat

test_luaquerymapper: luaquerymapper.cc
	@../../tools/test luaquerymapper.cc queryparser.cc queryhandler.cc tcpsocket.cc exception.cc uid.cc log.cc saxparser.cc -lexpat $(LUA_LIBS)

test_templateparser: templateparser.cc
	@../../tools/test templateparser.cc saxparser.cc -lexpat -DXML="\"../xml\""

test_server: server.cc
	@../../tools/test server.cc templateparser.cc saxparser.cc queryparser.cc queryhandler.cc luaquerymapper.cc tcpsocket.cc exception.cc log.cc configuration.cc transactionparser.cc widgetgenerator.cc -lexpat $(LUA_LIBS) $(CONFIG_LIBS) -DXML="\"../xml\""

#killall -9 test_server

test_database: database.cc
	@../../tools/test database.cc $(PQXX_LIBS) $(PQXX_CXXFLAGS)

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