blob: 395698832b6028db28d3959deb244561a1eaa4b2 [file] [log] [blame]
Alexander Afanasyev93ef1512012-08-31 15:37:40 -07001diff --git Makefile Makefile
2new file mode 100644
3index 0000000..2836550
4--- /dev/null
5+++ Makefile
6@@ -0,0 +1,5 @@
7+
8+all install clean uninstall: .always
9+ (cd source; make $@)
10+
11+.always:
12diff --git source/Makefile source/Makefile
13index f6fba70..8531b0a 100644
14--- source/Makefile
15+++ source/Makefile
16@@ -1,31 +1,27 @@
17-CC = gcc
18-CFLAGS = -g -Wall -Wpointer-arith -Wreturn-type -Wstrict-prototypes
19 LIBS = -lccn -lcrypto
20
21 PROGRAM_CL = trace
22 PROGRAM_SR = ccn_traced
23
24-INSTALL_DIR=/usr/local/bin
25-
26 all: $(PROGRAM_CL) $(PROGRAM_SR)
27
28 trace: trace_client.o
29- $(CC) $(CFLAGS) -o trace trace_client.o $(LIBS)
30+ $(CC) $(CFLAGS) $(LDFLAGS) -o trace trace_client.o $(LIBS)
31
32 trace_client.o:
33 $(CC) $(CFLAGS) -c trace_client.c
34
35 ccn_traced: trace_server.o
36- $(CC) $(CFLAGS) -o ccn_traced trace_server.o $(LIBS)
37+ $(CC) $(CFLAGS) $(LDFLAGS) -o ccn_traced trace_server.o $(LIBS)
38
39 trace_server.o:
40 $(CC) $(CFLAGS) -c trace_server.c
41
42 install:
43- install -m 0755 $(PROGRAM_CL) $(PROGRAM_SR) $(INSTALL_DIR)
44+ install -m 0755 $(PROGRAM_CL) $(PROGRAM_SR) $(DESTDIR)$(INSTALL_DIR)/bin
45
46 uninstall:
47- rm -f $(INSTALL_DIR)/$(PROGRAM_CL) $(INSTALL_DIR)/$(PROGRAM_SR)
48+ rm -f $(DESTDIR)$(INSTALL_DIR)/bin/$(PROGRAM_CL) $(DESTDIR)$(INSTALL_DIR)/bin/$(PROGRAM_SR)
49
50 clean:
51 rm -f *.o