Makefile Update
diff --git a/Makefile b/Makefile
index 2498b17..91b5394 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,24 @@
CC = cc
CFLAGS = -g -Wall -Wpointer-arith -Wreturn-type -Wstrict-prototypes
-LIBS = -lcrypto -lccn
+LIBS = -lccn -lcrypto
PROGRAMS = nlsr
+INSTALL_PATH=/usr/local/bin/
+
+NLSR_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
+
all: $(PROGRAMS)
-nlsr: 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
- $(CC) $(CFLAGS) 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 -o nlsr $(LIBS)
+nlsr: $(NLSR_SRCS)
+ $(CC) $(CFLAGS) $(NLSR_SRCS) -o nlsr $(LIBS)
+
+install: $(PROGRAMS)
+ cp $(PROGRAMS) $(INSTALL_PATH)
+ cd $(INSTALL_PATH); chown root:0 $(PROGRAMS); chmod 755 $(PROGRAMS)
+
+uninstall:
+ cd $(INSTALL_PATH); rm -f $(PROGRAMS)
clean:
rm -f *.o