NSIS-ka
A free C++ implementation of NSIS protocols

root/natfw-nslp/trunk/src/Makefile @ 2273

Revision 2273, 2.5 KB (checked in by stud-matfried, 7 years ago)

Renamed the benchmark class to benchmark_journal.
We will need the name "benchmark" later.

  • Property svn:keywords set to Id HeadURL
Line 
1#
2# Makefile - Makefile for the NATFW NSLP
3#
4# $Id$
5# $HeadURL$
6#
7# make          run the build process
8# make clean    delete all generated output
9#
10# The following Makefile variables may be used:
11#     LOGGING        Enable logging output (default: active)
12#     DEBUGGING      Enable debugging (default: active)
13#     OPTIMIZATION   Optimize using the given flags (default: '')
14#     BENCHMARK      Create benchmarks (default: inactive)
15#
16DEBUGGING       = 1                     # the undefined value disables debugging
17LOGGING         = 1                     # the undefined value disables logging
18OPTIMIZATION    =                       # ie. -O2
19BENCHMARK       =                       # assign a value to enable benchmarking
20
21# The external static libraries we depend on
22#
23LIB_PROT = ../protlib/src/libprot.a
24LIB_FASTQUEUE = ../protlib/fastqueue/libfastqueue.a
25LIB_GIST = ../ntlp/src/libGIST.a
26LIB_NATFW_MSG = msg/libnatfw_msg.a
27
28ALL_LIBS = $(LIB_NATFW_MSG) $(LIB_GIST) $(LIB_PROT) $(LIB_FASTQUEUE)
29
30INC =  -I../include -I../protlib/include -I../protlib/fastqueue \
31        -I../ntlp/include
32
33
34# The targets to build
35#
36NATFW_BIN = natfwd
37NATFW_LIB = libnatfw.a
38
39TEST_CLIENT = test_client
40TEST_STRESS = test_stress
41
42# Compiler and linker settings common to all targets
43#
44CXX = g++
45AR = ar
46CXXFLAGS = -Wall -g -pedantic -Wno-long-long $(INC)
47LDFLAGS = $(ALL_LIBS) -lcrypto -lpthread -lipq -lssl -lrt
48
49
50ifdef BENCHMARK
51CXXFLAGS += -DBENCHMARK
52endif
53
54ifndef LOGGING
55CXXFLAGS += -D_NO_LOGGING
56endif
57
58CXXFLAGS += $(OPTIMIZATION)
59
60
61NATFW_OBJS = session.o session_manager.o dispatcher.o natfw_daemon.o \
62        session_id.o ni_session.o nf_session.o nr_session.o nr_rea_session.o \
63        nf_edge_rea_session.o nf_non_edge_rea_session.o natfw_config.o \
64        policy_rule.o policy_rule_installer.o iptables_policy_rule_installer.o \
65        nat_manager.o gistka_mapper.o natfw_timers.o benchmark_journal.o
66
67
68# Targets
69#
70
71.PHONY: clean all msg
72
73all: msg $(NATFW_BIN) $(NATFW_LIB) $(TEST_CLIENT) $(TEST_STRESS)
74
75
76$(NATFW_BIN): main.o $(NATFW_OBJS) $(ALL_LIBS)
77        $(CXX) -o $@ main.o $(NATFW_OBJS) $(LDFLAGS)
78
79$(TEST_CLIENT): test_client.o $(NATFW_OBJS) $(LIB_NATFW_MSG) $(ALL_LIBS)
80        $(CXX) -o $@ test_client.o $(NATFW_OBJS) $(LDFLAGS)
81
82$(TEST_STRESS): test_stress.o $(NATFW_OBJS) $(LIB_NATFW_MSG) $(ALL_LIBS)
83        $(CXX) -o $@ test_stress.o $(NATFW_OBJS) $(LDFLAGS)
84
85$(NATFW_LIB): $(NATFW_OBJS)
86        $(AR) -rsv $@ $?
87
88msg:
89        $(MAKE) -C $@
90
91clean: 
92        -rm $(NATFW_BIN) $(NATFW_LIB) $(TEST_CLIENT) $(TEST_STRESS) \
93                $(wildcard *.o) depend
94        $(MAKE) -C msg clean
95
96depend:
97        $(CXX) -MM $(CXXFLAGS) $(wildcard *.cpp) > depend
98
99# Include dependencies, do not delete!
100-include depend
Note: See TracBrowser for help on using the browser.