blob: 313a3ac3145ba36d6023f5cc7e8a493e684669bb [file] [log] [blame]
Syed Obaid Amin7a176c62012-12-21 15:56:00 -06001CC = gcc
Syed Obaid Amin83eea122013-01-08 12:21:37 -06002CFLAGS = -g -Wall -gdwarf-2 -g3
akmhoque8fdd6412012-12-04 15:05:33 -06003LIBS = -lccn -lccnsync -lcrypto
4
5PROGRAMS = nlsrc nlsr
6INSTALL_PATH=/usr/local/bin/
7
akmhoquea37b52c2012-12-14 11:16:36 -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
akmhoque8fdd6412012-12-04 15:05:33 -06009NLSRC_SRCS=nlsrc.c
10
11all: $(PROGRAMS)
12
13nlsr: $(NLSR_SRCS)
Syed Obaid Amin7a176c62012-12-21 15:56:00 -060014 $(CC) $(CFLAGS) $(NLSR_SRCS) $(LIBS) -lm -o nlsr
akmhoque8fdd6412012-12-04 15:05:33 -060015
16nlsrc: $(NLSRC_SRCS)
Syed Obaid Amin7a176c62012-12-21 15:56:00 -060017 $(CC) $(CFLAGS) $(NLSRC_SRCS) $(LIBS) -lm -o nlsrc
akmhoque8fdd6412012-12-04 15:05:33 -060018
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)
akmhoqueb29edd82013-01-14 20:54:11 -060029 rm -rf *.dSYM
akmhoque8fdd6412012-12-04 15:05:33 -060030
31.c.o:
32 $(CC) $(CFLAGS) -c $<
33
34.PHONY: all clean