summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index ef572e6..7617e07 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,20 @@
1SOURCES = main.c 1SOURCES = $(wildcard *.c)
2DEPS= 2DEPS=libtoxcore
3CC=gcc 3CC=gcc
4CFLAGS=-g 4CFLAGS=-g #-std=c99
5CFLAGS += $(shell pkg-config --cflags $(DEPS))
6LDFLAGS=-g -pthread -lm -static
7LDFLAGS += $(shell pkg-config --libs $(DEPS))
5OBJECTS=$(SOURCES:.c=.o) 8OBJECTS=$(SOURCES:.c=.o)
9INCLUDES = $(wildcard *.h)
6 10
7.c.o: 11.c.o: $(INCLUDES)
8 $(CC) $(CFLAGS) $< -c -o $@ 12 $(CC) $(CFLAGS) $< -c -o $@
9 13
10tuntox: $(OBJECTS) 14tuntox: $(OBJECTS) $(INCLUDES)
11 $(CC) --static -o $@ -ltoxcore $^ $(CFLAGS) /usr/local/lib/libsodium.a 15 $(CC) -o $@ $(OBJECTS) -ltoxcore -lpthread $(LDFLAGS) /usr/local/lib/libsodium.a /usr/local/lib/libtoxcore.a
12 16
13all: tuntox 17cscope.out:
18 cscope -bv ./*.[ch]
14 19
20all: cscope.out tuntox