sending of options now works
[ana-net.git] / usr / Makefile
blob724439a27857abe3fd610d6527549457929176eb
2 # Lightweight Autonomic Network Architecture
4 # Copyright 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,
5 # Swiss federal institute of technology (ETH Zurich)
6 # Subject to the GPL.
9 LD_NORM = echo "LD $<"; \
10 gcc -pie -z relo
11 CC_NORM = echo "CC $<"; \
12 gcc
14 LD = $(LD_NORM) -o
15 CC = $(CC_NORM) -c
17 MAKEFLAGS += --no-print-directory
19 BINDIR = usr/sbin
20 ETCDIR = etc
22 CFLAGS += -O2 -fno-delete-null-pointer-checks -std=gnu99 -pedantic
23 CFLAGS += -fstack-protector -D_FORTIFY_SOURCE=2 -fPIE -D_REENTRANT
24 CFLAGS += -Wall -Werror -Wundef -Wstrict-prototypes -Wuninitialized
26 INCLUDE = -I../src/
28 fbctl-libs =
29 fbctl-objs = fbctl.o
30 fbctl-targ = fbctl
32 vlink-libs =
33 vlink-objs = vlink.o
34 vlink-targ = vlink
36 all: build
38 build: build_vlink build_fbctl
40 build_vlink: $(vlink-objs)
41 @$(LD) $(vlink-targ) $(vlink-objs) $(vlink-libs)
43 build_fbctl: $(fbctl-objs)
44 @$(LD) $(fbctl-targ) $(fbctl-objs) $(fbctl-libs)
46 %.o: %.c
47 @$(CC) $(CFLAGS) $(INCLUDE) $<
49 install:
50 @install -D $(vlink-targ) $(DESTDIR)/$(BINDIR)/$(vlink-targ)
51 @install -D $(fbctl-targ) $(DESTDIR)/$(BINDIR)/$(fbctl-targ)
53 uninstall:
54 @rm $(DESTDIR)/$(BINDIR)/$(vlink-targ)
55 @rm $(DESTDIR)/$(BINDIR)/$(fbctl-targ)
57 clean:
58 @rm *.o *~ $(vlink-targ) $(fbctl-targ)
60 help:
61 @echo "make <targets>"
62 @echo "available targets:"
63 @echo " build - Builds source"
64 @echo " clean - Removes generated files"
65 @echo " install - Installs userspace tools into system"
66 @echo " uninstall - Removes userspace tools from system"
67 @echo " help - Shows this help"