blob: d92ec7c2cf71ba52a4053ebce9f2f14902c23fd1 [file] [log] [blame]
akmhoque8fdd6412012-12-04 15:05:33 -06001CC = cc
2CFLAGS = -g -Wall -Wpointer-arith -Wreturn-type -Wstrict-prototypes
3LIBS = -lccn -lccnsync -lcrypto
4
5PROGRAMS = nlsrc nlsr
6INSTALL_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 nlsr_sync.c utility.c
9NLSRC_SRCS=nlsrc.c
10
11all: $(PROGRAMS)
12
13nlsr: $(NLSR_SRCS)
14 $(CC) $(CFLAGS) $(NLSR_SRCS) -o nlsr $(LIBS) -lm
15
16nlsrc: $(NLSRC_SRCS)
17 $(CC) $(CFLAGS) $(NLSRC_SRCS) -o nlsrc $(LIBS) -lm
18
19install: $(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)
25
26clean:
27 rm -f *.o
28 rm -f $(PROGRAMS)
29 rm -rf $(PROGRAMS).dSYM
30
31.c.o:
32 $(CC) $(CFLAGS) -c $<
33
34.PHONY: all clean