blob: f9d826ca4d65a7467354616a8a431852bd7f473d [file] [log] [blame]
akmhoqueb77b95f2013-02-08 12:28:47 -06001CC = gcc
Obaid Amin767d13d2013-02-11 23:17:40 -06002CFLAGS = -Wall -gdwarf-2 -g3
akmhoqueb77b95f2013-02-08 12:28:47 -06003LIBS = -lccn -lccnsync -lcrypto
akmhoque8adb43b2012-08-09 12:37:33 -05004
akmhoque1771c412012-11-09 13:06:08 -06005PROGRAMS = nlsrc nlsr
akmhoquecfac7782012-09-26 10:36:01 -05006INSTALL_PATH=/usr/local/bin/
7
akmhoqueb77b95f2013-02-08 12:28:47 -06008NLSR_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
akmhoque1771c412012-11-09 13:06:08 -06009NLSRC_SRCS=nlsrc.c
akmhoque8adb43b2012-08-09 12:37:33 -050010
11all: $(PROGRAMS)
12
akmhoquecfac7782012-09-26 10:36:01 -050013nlsr: $(NLSR_SRCS)
akmhoqueb77b95f2013-02-08 12:28:47 -060014 $(CC) $(CFLAGS) $(NLSR_SRCS) $(LIBS) -lm -o nlsr
akmhoquecfac7782012-09-26 10:36:01 -050015
akmhoque1771c412012-11-09 13:06:08 -060016nlsrc: $(NLSRC_SRCS)
akmhoqueb77b95f2013-02-08 12:28:47 -060017 $(CC) $(CFLAGS) $(NLSRC_SRCS) $(LIBS) -lm -o nlsrc
akmhoque1771c412012-11-09 13:06:08 -060018
akmhoquecfac7782012-09-26 10:36:01 -050019install: $(PROGRAMS)
20 cp $(PROGRAMS) $(INSTALL_PATH)
21 cd $(INSTALL_PATH); chown root:0 $(PROGRAMS); chmod 755 $(PROGRAMS)
22
23uninstall:
24 cd $(INSTALL_PATH); rm -f $(PROGRAMS)
akmhoque8adb43b2012-08-09 12:37:33 -050025
26clean:
27 rm -f *.o
28 rm -f $(PROGRAMS)
akmhoquefb7d0bc2013-01-16 19:17:45 -060029 rm -rf *.dSYM
akmhoque8adb43b2012-08-09 12:37:33 -050030
31.c.o:
32 $(CC) $(CFLAGS) -c $<
33
34.PHONY: all clean