summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile44
1 files changed, 44 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..27ce0e6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,44 @@
+__YES=1
+__NO=0
+TYPE_ACCESS=access
+TYPE_FORWARD=forward
+type=
+__MAKE_CHECK=$(__NO)
+CFLAGS=
+
+ifeq ($(type), $(TYPE_ACCESS))
+ __MAKE_CHECK = $(__YES)
+ CFLAGS += -DCOMPILE_ACCESS=1
+endif
+
+ifeq ($(type), $(TYPE_FORWARD))
+ __MAKE_CHECK = $(__YES)
+ CFLAGS += -DCOMPILE_FORWARD=1
+endif
+
+ifeq ($(__MAKE_CHECK), $(__NO))
+ $(error must assign type use make type=[access|forward]!)
+ exit
+endif
+
+export CFLAGS
+export type
+export TYPE_ACCESS
+export TYPE_FORWARD
+
+all:
+ cd support/ltsm; $(MAKE);
+ cd src/access; $(MAKE);
+ cd src/common; $(MAKE);
+ cd src/packet_io; $(MAKE);
+ cd src/forward; $(MAKE);
+ cd src; $(MAKE);
+
+clean:
+ cd src/access; $(MAKE) clean;
+ cd src/common; $(MAKE) clean;
+ cd src/packet_io; $(MAKE) clean;
+ cd src/forward; $(MAKE) clean;
+ cd src; $(MAKE) clean;
+ cd support/ltsm; $(MAKE) clean;
+ rm -f bin/flowood_access bin/flowood_forward