author | Tero Marttila <terom@fixme.fi> |
Sat, 13 Dec 2008 19:55:50 +0200 | |
branch | new-evsql |
changeset 53 | 0d6e07f4c9a1 |
parent 52 | f5037572c326 |
permissions | -rw-r--r-- |
1 | 1 |
LIBEVENT_PATH = ../libs/libevent-dev |
44
9e76ee9729b6
more work on the new evsql interface
Tero Marttila <terom@fixme.fi>
parents:
41
diff
changeset
|
2 |
LIBFUSE_PATH = ../opt |
0 | 3 |
|
4 |
LIBRARY_PATHS = -L${LIBEVENT_PATH}/lib -L${LIBFUSE_PATH}/lib |
|
5 |
INCLUDE_PATHS = -I${LIBEVENT_PATH}/include -I${LIBFUSE_PATH}/include |
|
11 | 6 |
LDLIBS = -levent -lfuse -lpq |
0 | 7 |
|
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
8 |
# default is test |
40
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
9 |
ifndef MODE |
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
10 |
MODE = test |
40
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
11 |
endif |
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
12 |
|
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
13 |
ifeq ($(MODE), debug) |
40
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
14 |
MODE_CFLAGS = -g -DDEBUG_ENABLED |
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
15 |
else ifeq ($(MODE), dev) |
40
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
16 |
MODE_CFLAGS = -g |
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
17 |
else ifeq ($(MODE), test) |
40
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
18 |
MODE_CFLAGS = -g -DINFO_DISABLED |
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
19 |
else ifeq ($(MODE), release) |
40
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
20 |
MODE_CFLAGS = -DINFO_DISABLED -O2 |
28
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
25
diff
changeset
|
21 |
endif |
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
25
diff
changeset
|
22 |
|
1 | 23 |
# XXX: ugh... use `pkg-config fuse` |
40
03017f5f0087
add MODE param to makefile, fix INFO_DISABLED, add some constraints to the .sql, fix some -err's, EVSQL_PQ_ARBITRARY_TYPE_OID, and make read/write transactionless
Tero Marttila <terom@fixme.fi>
parents:
38
diff
changeset
|
24 |
DEFINES = -D_FILE_OFFSET_BITS=64 |
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
25 |
FIXED_CFLAGS = -Wall -std=gnu99 |
0 | 26 |
|
45
424ce5ab82fd
compiles + some basic evsql_test
Tero Marttila <terom@fixme.fi>
parents:
44
diff
changeset
|
27 |
BIN_NAMES = helloworld hello simple_hello evpq_test url_test dbfs evsql_test |
19 | 28 |
BIN_PATHS = $(addprefix bin/,$(BIN_NAMES)) |
0 | 29 |
|
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
30 |
# modules |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
31 |
module_objs = $(patsubst src/%.c,obj/%.o,$(wildcard src/$(1)/*.c)) |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
32 |
|
28
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
25
diff
changeset
|
33 |
# complex modules |
45
424ce5ab82fd
compiles + some basic evsql_test
Tero Marttila <terom@fixme.fi>
parents:
44
diff
changeset
|
34 |
CORE_OBJS = obj/lib/log.o obj/lib/signals.o |
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
35 |
EVSQL_OBJS = $(call module_objs,evsql) obj/evpq.o |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
36 |
DBFS_OBJS = $(call module_objs,dbfs) obj/dirbuf.o |
28
e944453ca924
split off dbfs components into a separate dir, improve dirop docs, error handling, etc
Tero Marttila <terom@fixme.fi>
parents:
25
diff
changeset
|
37 |
|
11 | 38 |
# first target |
39 |
all: ${BIN_PATHS} |
|
40 |
||
41 |
# binaries |
|
1 | 42 |
bin/helloworld: |
45
424ce5ab82fd
compiles + some basic evsql_test
Tero Marttila <terom@fixme.fi>
parents:
44
diff
changeset
|
43 |
bin/hello: obj/evfuse.o obj/dirbuf.o ${CORE_OBJS} |
424ce5ab82fd
compiles + some basic evsql_test
Tero Marttila <terom@fixme.fi>
parents:
44
diff
changeset
|
44 |
bin/simple_hello: obj/evfuse.o obj/dirbuf.o obj/simple.o ${CORE_OBJS} |
11 | 45 |
bin/evpq_test: obj/evpq.o obj/lib/log.o |
15 | 46 |
bin/url_test: obj/lib/url.o obj/lib/lex.o obj/lib/log.o |
45
424ce5ab82fd
compiles + some basic evsql_test
Tero Marttila <terom@fixme.fi>
parents:
44
diff
changeset
|
47 |
bin/dbfs: ${DBFS_OBJS} ${EVSQL_OBJS} obj/evfuse.o ${CORE_OBJS} |
424ce5ab82fd
compiles + some basic evsql_test
Tero Marttila <terom@fixme.fi>
parents:
44
diff
changeset
|
48 |
bin/evsql_test: ${EVSQL_OBJS} ${CORE_OBJS} |
0 | 49 |
|
50 |
# computed |
|
41
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
51 |
LDFLAGS = ${LIBRARY_PATHS} |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
52 |
|
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
53 |
CPPFLAGS = ${INCLUDE_PATHS} ${DEFINES} |
6abda2fa4579
touch up the Makefile, define err_t as unsigned int in error.h, and add some preliminary interrupt support, although it will always deadlock due to a bug in libfuse
Tero Marttila <terom@fixme.fi>
parents:
40
diff
changeset
|
54 |
CFLAGS = ${MODE_CFLAGS} ${FIXED_CFLAGS} |
0 | 55 |
|
19 | 56 |
SRC_PATHS = $(wildcard src/*.c) $(wildcard src/*/*.c) |
0 | 57 |
SRC_NAMES = $(patsubst src/%,%,$(SRC_PATHS)) |
1 | 58 |
SRC_DIRS = $(dir $(SRC_NAMES)) |
0 | 59 |
|
11 | 60 |
# other targets |
0 | 61 |
clean : |
31 | 62 |
-rm obj/*.o obj/*/*.o |
63 |
-rm bin/* |
|
64 |
-rm build/deps/*.d build/deps/*/*.d |
|
29
5de62ca9a5aa
reorganize evsql into a separate dir, rename dbfs slightly, and split dbfs_op out from dirop (in prep for fileop)
Tero Marttila <terom@fixme.fi>
parents:
28
diff
changeset
|
65 |
|
5de62ca9a5aa
reorganize evsql into a separate dir, rename dbfs slightly, and split dbfs_op out from dirop (in prep for fileop)
Tero Marttila <terom@fixme.fi>
parents:
28
diff
changeset
|
66 |
clean-deps: |
5de62ca9a5aa
reorganize evsql into a separate dir, rename dbfs slightly, and split dbfs_op out from dirop (in prep for fileop)
Tero Marttila <terom@fixme.fi>
parents:
28
diff
changeset
|
67 |
-rm build/deps/*/*.d |
5de62ca9a5aa
reorganize evsql into a separate dir, rename dbfs slightly, and split dbfs_op out from dirop (in prep for fileop)
Tero Marttila <terom@fixme.fi>
parents:
28
diff
changeset
|
68 |
-rm build/deps/*.d |
0 | 69 |
|
11 | 70 |
#obj-dirs: |
71 |
# python build/make_obj_dirs.py $(BIN_PATHS) |
|
0 | 72 |
|
11 | 73 |
build/deps/%.d : src/%.c |
74 |
@set -e; rm -f $@; \ |
|
20
f0ef6d8880b4
fix build deps for subdirs of src
Tero Marttila <terom@fixme.fi>
parents:
19
diff
changeset
|
75 |
$(CC) -MM -MT __ $(CPPFLAGS) $< > $@.$$$$; \ |
f0ef6d8880b4
fix build deps for subdirs of src
Tero Marttila <terom@fixme.fi>
parents:
19
diff
changeset
|
76 |
sed 's,__[ :]*,obj/$*.o $@ : ,g' < $@.$$$$ > $@; \ |
11 | 77 |
rm -f $@.$$$$ |
78 |
||
79 |
include $(SRC_NAMES:%.c=build/deps/%.d) |
|
1 | 80 |
|
0 | 81 |
obj/%.o : src/%.c |
11 | 82 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ |
0 | 83 |
|
84 |
bin/% : obj/%.o |
|
1 | 85 |
$(CC) $(LDFLAGS) $+ $(LOADLIBES) $(LDLIBS) -o $@ |
0 | 86 |
|
52
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
87 |
# documentation |
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
88 |
DOXYGEN_PATH = /usr/bin/doxygen |
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
89 |
DOXYGEN_CONF_PATH = doc/doxygen.conf |
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
90 |
DOXYGEN_OUTPUT_FILE = doc/html/index.html |
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
91 |
|
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
92 |
docs : |
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
93 |
${DOXYGEN_PATH} ${DOXYGEN_CONF_PATH} |
f5037572c326
improved evsql docs and added a doxygen config file
Tero Marttila <terom@fixme.fi>
parents:
45
diff
changeset
|
94 |