-
This commit is contained in:
+20
-16
@@ -16,28 +16,35 @@ BUILD_DIR= ./bin/
|
||||
|
||||
MAIN_DIR= ./
|
||||
|
||||
LIBS= -lgmp -lpthread
|
||||
LDFLAGS= -lgmp -lpthread
|
||||
|
||||
CFLAGS+= -DLEAK_DETECTIVE -I.
|
||||
|
||||
# objects is extended by each included Makefile
|
||||
OBJS=
|
||||
|
||||
daemon : build_dir $(BUILD_DIR)charon
|
||||
all : build_dir $(BUILD_DIR)charon $(BUILD_DIR)run_tests
|
||||
|
||||
all : build_dir $(BUILD_DIR)charon $(BUILD_DIR)run_tests
|
||||
daemon : $(BUILD_DIR)charon
|
||||
|
||||
testcases : $(BUILD_DIR)run_tests
|
||||
|
||||
doxygen :
|
||||
doxygen doxyconfig.DoxyFile
|
||||
|
||||
|
||||
include $(MAIN_DIR)network/Makefile.network
|
||||
include $(MAIN_DIR)config/Makefile.config
|
||||
include $(MAIN_DIR)encoding/Makefile.encoding
|
||||
include $(MAIN_DIR)queues/Makefile.queues
|
||||
include $(MAIN_DIR)sa/Makefile.sa
|
||||
include $(MAIN_DIR)threads/Makefile.threads
|
||||
include $(MAIN_DIR)transforms/Makefile.transforms
|
||||
include $(MAIN_DIR)utils/Makefile.utils
|
||||
|
||||
|
||||
build_dir:
|
||||
mkdir $(BUILD_DIR)
|
||||
mkdir -p $(BUILD_DIR)
|
||||
|
||||
$(BUILD_DIR)daemon.o : daemon.c daemon.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
@@ -50,18 +57,15 @@ OBJS+=$(BUILD_DIR)definitions.o
|
||||
$(BUILD_DIR)definitions.o : definitions.c definitions.h
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
|
||||
|
||||
$(BUILD_DIR)charon : $(OBJS) $(BUILD_DIR)daemon.o
|
||||
$(CC) $(CFLAGS) $(OBJS) $(BUILD_DIR)daemon.o -o $@
|
||||
|
||||
|
||||
#include testcases/Makefile.testcases
|
||||
|
||||
#$(BUILD_DIR)run_tests : $(OBJS)
|
||||
$(CC) $(CFLAGS) $(OBJS) -o $@
|
||||
|
||||
$(CC) $(LDFLAGS) $(OBJS) $(BUILD_DIR)daemon.o -o $@
|
||||
|
||||
TEST_OBJS = $(OBJS)
|
||||
include $(MAIN_DIR)testcases/Makefile.testcases
|
||||
|
||||
$(BUILD_DIR)run_tests : $(TEST_OBJS)
|
||||
$(CC) $(LDFLAGS) $(TEST_OBJS) -o $@
|
||||
|
||||
clean :
|
||||
rm $(OBJS) $(BUILD_DIR)charon $(BUILD_DIR)daemon.o; \
|
||||
rmdir $(BUILD_DIR)
|
||||
rm -f $(TEST_OBJS) $(BUILD_DIR)charon $(BUILD_DIR)run_tests $(BUILD_DIR)daemon.o; \
|
||||
rmdir $(BUILD_DIR)
|
||||
|
||||
Reference in New Issue
Block a user