blob: 3236fe6e4b915eb4851961c442236321bb58a825 [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
akmhoque1771c412012-11-09 13:06:08 -06005PROGRAMS = nlsrc 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
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)
akmhoque9190f4f2012-10-05 08:10:28 -050014 $(CC) $(CFLAGS) $(NLSR_SRCS) -o nlsr $(LIBS) -lm
akmhoquecfac7782012-09-26 10:36:01 -050015
akmhoque1771c412012-11-09 13:06:08 -060016nlsrc: $(NLSRC_SRCS)
17 $(CC) $(CFLAGS) $(NLSRC_SRCS) -o nlsrc $(LIBS) -lm
18
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