akmhoque | 8adb43b | 2012-08-09 12:37:33 -0500 | [diff] [blame] | 1 | CC = cc |
akmhoque | 3cced64 | 2012-09-24 16:20:20 -0500 | [diff] [blame] | 2 | CFLAGS = -g -Wall -Wpointer-arith -Wreturn-type -Wstrict-prototypes |
akmhoque | cfac778 | 2012-09-26 10:36:01 -0500 | [diff] [blame] | 3 | LIBS = -lccn -lcrypto |
akmhoque | 8adb43b | 2012-08-09 12:37:33 -0500 | [diff] [blame] | 4 | |
akmhoque | 1489155 | 2012-08-09 13:33:06 -0500 | [diff] [blame] | 5 | PROGRAMS = nlsr |
akmhoque | cfac778 | 2012-09-26 10:36:01 -0500 | [diff] [blame] | 6 | INSTALL_PATH=/usr/local/bin/ |
| 7 | |
| 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 utility.c |
| 9 | |
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 | 9190f4f | 2012-10-05 08:10:28 -0500 | [diff] [blame] | 14 | $(CC) $(CFLAGS) $(NLSR_SRCS) -o nlsr $(LIBS) -lm |
akmhoque | cfac778 | 2012-09-26 10:36:01 -0500 | [diff] [blame] | 15 | |
| 16 | install: $(PROGRAMS) |
| 17 | cp $(PROGRAMS) $(INSTALL_PATH) |
| 18 | cd $(INSTALL_PATH); chown root:0 $(PROGRAMS); chmod 755 $(PROGRAMS) |
| 19 | |
| 20 | uninstall: |
| 21 | cd $(INSTALL_PATH); rm -f $(PROGRAMS) |
akmhoque | 8adb43b | 2012-08-09 12:37:33 -0500 | [diff] [blame] | 22 | |
| 23 | clean: |
| 24 | rm -f *.o |
| 25 | rm -f $(PROGRAMS) |
| 26 | rm -rf $(PROGRAMS).dSYM |
| 27 | |
| 28 | .c.o: |
| 29 | $(CC) $(CFLAGS) -c $< |
| 30 | |
| 31 | .PHONY: all clean |