1 # Copyright (C) 2005 Jan Hutter, Martin Willi
2 # Hochschule fuer Technik Rapperswil
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by the
6 # Free Software Foundation; either version 2 of the License, or (at your
7 # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 # This program is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 LDFLAGS
= -lgmp
-lpthread
21 CFLAGS
+= -Wall
-Werror
-DLEAK_DETECTIVE
-I.
-g
23 # objects is extended by each included Makefile
26 all : build_dir
$(BUILD_DIR
)charon
$(BUILD_DIR
)run_tests
28 daemon
: $(BUILD_DIR
)charon
30 testcases
: $(BUILD_DIR
)run_tests
36 include $(MAIN_DIR
)network
/Makefile.network
37 include $(MAIN_DIR
)config
/Makefile.config
38 include $(MAIN_DIR
)encoding
/Makefile.encoding
39 include $(MAIN_DIR
)queues
/Makefile.queues
40 include $(MAIN_DIR
)sa
/Makefile.sa
41 include $(MAIN_DIR
)threads
/Makefile.threads
42 include $(MAIN_DIR
)transforms
/Makefile.transforms
43 include $(MAIN_DIR
)utils
/Makefile.utils
49 $(BUILD_DIR
)daemon.o
: daemon.c daemon.h
50 $(CC
) $(CFLAGS
) -c
-o
$@
$<
52 OBJS
+=$(BUILD_DIR
)types.o
53 $(BUILD_DIR
)types.o
: types.c types.h
54 $(CC
) $(CFLAGS
) -c
-o
$@
$<
56 OBJS
+=$(BUILD_DIR
)definitions.o
57 $(BUILD_DIR
)definitions.o
: definitions.c definitions.h
58 $(CC
) $(CFLAGS
) -c
-o
$@
$<
60 $(BUILD_DIR
)charon
: $(OBJS
) $(BUILD_DIR
)daemon.o
61 $(CC
) $(LDFLAGS
) $(OBJS
) $(BUILD_DIR
)daemon.o
-o
$@
64 include $(MAIN_DIR
)testcases
/Makefile.testcases
66 $(BUILD_DIR
)run_tests
: $(TEST_OBJS
)
67 $(CC
) $(LDFLAGS
) $(TEST_OBJS
) -o
$@
70 rm -f
$(TEST_OBJS
) $(BUILD_DIR
)charon
$(BUILD_DIR
)run_tests
$(BUILD_DIR
)daemon.o
; \