Syed Obaid Amin | 7a176c6 | 2012-12-21 15:56:00 -0600 | [diff] [blame] | 1 | CC = gcc |
Syed Obaid Amin | 83eea12 | 2013-01-08 12:21:37 -0600 | [diff] [blame] | 2 | CFLAGS = -g -Wall -gdwarf-2 -g3 |
akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 3 | LIBS = -lccn -lccnsync -lcrypto |
| 4 | |
| 5 | PROGRAMS = nlsrc nlsr |
| 6 | INSTALL_PATH=/usr/local/bin/ |
| 7 | |
akmhoque | a37b52c | 2012-12-14 11:16:36 -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 utility.c |
akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 9 | NLSRC_SRCS=nlsrc.c |
| 10 | |
| 11 | all: $(PROGRAMS) |
| 12 | |
| 13 | nlsr: $(NLSR_SRCS) |
Syed Obaid Amin | 7a176c6 | 2012-12-21 15:56:00 -0600 | [diff] [blame] | 14 | $(CC) $(CFLAGS) $(NLSR_SRCS) $(LIBS) -lm -o nlsr |
akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 15 | |
| 16 | nlsrc: $(NLSRC_SRCS) |
Syed Obaid Amin | 7a176c6 | 2012-12-21 15:56:00 -0600 | [diff] [blame] | 17 | $(CC) $(CFLAGS) $(NLSRC_SRCS) $(LIBS) -lm -o nlsrc |
akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 18 | |
| 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) |
| 25 | |
| 26 | clean: |
| 27 | rm -f *.o |
| 28 | rm -f $(PROGRAMS) |
akmhoque | b29edd8 | 2013-01-14 20:54:11 -0600 | [diff] [blame] | 29 | rm -rf *.dSYM |
akmhoque | 8fdd641 | 2012-12-04 15:05:33 -0600 | [diff] [blame] | 30 | |
| 31 | .c.o: |
| 32 | $(CC) $(CFLAGS) -c $< |
| 33 | |
| 34 | .PHONY: all clean |