akmhoque | b77b95f | 2013-02-08 12:28:47 -0600 | [diff] [blame] | 1 | CC = gcc |
Obaid Amin | 767d13d | 2013-02-11 23:17:40 -0600 | [diff] [blame] | 2 | CFLAGS = -Wall -gdwarf-2 -g3 |
akmhoque | b77b95f | 2013-02-08 12:28:47 -0600 | [diff] [blame] | 3 | LIBS = -lccn -lccnsync -lcrypto |
akmhoque | 8adb43b | 2012-08-09 12:37:33 -0500 | [diff] [blame] | 4 | |
akmhoque | 1771c41 | 2012-11-09 13:06:08 -0600 | [diff] [blame] | 5 | PROGRAMS = nlsrc nlsr |
akmhoque | cfac778 | 2012-09-26 10:36:01 -0500 | [diff] [blame] | 6 | INSTALL_PATH=/usr/local/bin/ |
7 | |||||
akmhoque | edb68d9 | 2013-03-05 10:18:16 -0600 | [diff] [blame] | 8 | NLSR_SRCS=nlsr.c nlsr_ndn.c nlsr_npl.c nlsr_adl.c nlsr_lsdb.c nlsr_route.c nlsr_npt.c nlsr_fib.c nlsr_sync.c nlsr_face.c nlsr_km.c nlsr_km_util.c utility.c |
akmhoque | 1771c41 | 2012-11-09 13:06:08 -0600 | [diff] [blame] | 9 | NLSRC_SRCS=nlsrc.c |
akmhoque | 8adb43b | 2012-08-09 12:37:33 -0500 | [diff] [blame] | 10 | |
11 | all: $(PROGRAMS) | ||||
12 | |||||
akmhoque | cfac778 | 2012-09-26 10:36:01 -0500 | [diff] [blame] | 13 | nlsr: $(NLSR_SRCS) |
akmhoque | b77b95f | 2013-02-08 12:28:47 -0600 | [diff] [blame] | 14 | $(CC) $(CFLAGS) $(NLSR_SRCS) $(LIBS) -lm -o nlsr |
akmhoque | cfac778 | 2012-09-26 10:36:01 -0500 | [diff] [blame] | 15 | |
akmhoque | 1771c41 | 2012-11-09 13:06:08 -0600 | [diff] [blame] | 16 | nlsrc: $(NLSRC_SRCS) |
akmhoque | b77b95f | 2013-02-08 12:28:47 -0600 | [diff] [blame] | 17 | $(CC) $(CFLAGS) $(NLSRC_SRCS) $(LIBS) -lm -o nlsrc |
akmhoque | 1771c41 | 2012-11-09 13:06:08 -0600 | [diff] [blame] | 18 | |
akmhoque | cfac778 | 2012-09-26 10:36:01 -0500 | [diff] [blame] | 19 | install: $(PROGRAMS) |
20 | cp $(PROGRAMS) $(INSTALL_PATH) | ||||
21 | cd $(INSTALL_PATH); chown root:0 $(PROGRAMS); chmod 755 $(PROGRAMS) | ||||
22 | |||||
23 | uninstall: | ||||
24 | cd $(INSTALL_PATH); rm -f $(PROGRAMS) | ||||
akmhoque | 8adb43b | 2012-08-09 12:37:33 -0500 | [diff] [blame] | 25 | |
26 | clean: | ||||
27 | rm -f *.o | ||||
28 | rm -f $(PROGRAMS) | ||||
akmhoque | fb7d0bc | 2013-01-16 19:17:45 -0600 | [diff] [blame] | 29 | rm -rf *.dSYM |
akmhoque | 8adb43b | 2012-08-09 12:37:33 -0500 | [diff] [blame] | 30 | |
31 | .c.o: | ||||
32 | $(CC) $(CFLAGS) -c $< | ||||
33 | |||||
34 | .PHONY: all clean |