blob: 91b5394fc69c5b670850d75b35a7d1f35f9c8cff [file] [log] [blame]
akmhoque8adb43b2012-08-09 12:37:33 -05001CC = cc
akmhoque3cced642012-09-24 16:20:20 -05002CFLAGS = -g -Wall -Wpointer-arith -Wreturn-type -Wstrict-prototypes
akmhoquecfac7782012-09-26 10:36:01 -05003LIBS = -lccn -lcrypto
akmhoque8adb43b2012-08-09 12:37:33 -05004
akmhoque14891552012-08-09 13:33:06 -05005PROGRAMS = nlsr
akmhoquecfac7782012-09-26 10:36:01 -05006INSTALL_PATH=/usr/local/bin/
7
8NLSR_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
akmhoque8adb43b2012-08-09 12:37:33 -050010
11all: $(PROGRAMS)
12
akmhoquecfac7782012-09-26 10:36:01 -050013nlsr: $(NLSR_SRCS)
14 $(CC) $(CFLAGS) $(NLSR_SRCS) -o nlsr $(LIBS)
15
16install: $(PROGRAMS)
17 cp $(PROGRAMS) $(INSTALL_PATH)
18 cd $(INSTALL_PATH); chown root:0 $(PROGRAMS); chmod 755 $(PROGRAMS)
19
20uninstall:
21 cd $(INSTALL_PATH); rm -f $(PROGRAMS)
akmhoque8adb43b2012-08-09 12:37:33 -050022
23clean:
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