summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGDR! <gdr@gdr.name>2016-12-07 14:56:26 +0100
committerGDR! <gdr@gdr.name>2016-12-07 14:56:26 +0100
commite093c65637385fe3b3db6ce5a830e5c9c2a00dd4 (patch)
tree933d17400354412b2ac0fe895884a76e6534d6e0 /Makefile
parentae6ff817c202fa6e41b6ec705152fbfee6c92cd1 (diff)
Made tuntox build with TokTok/c-toxcore
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 5e19d0a..1c4effd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,12 @@
1SOURCES = $(wildcard *.c) 1SOURCES = $(wildcard *.c)
2DEPS=libtoxcore 2DEPS=libsodium toxcore
3CC=gcc 3CC=gcc
4CFLAGS=-g #-std=c99 4CFLAGS=-g #-std=c99
5CFLAGS += $(shell pkg-config --cflags $(DEPS)) 5CFLAGS += $(shell pkg-config --cflags $(DEPS))
6LDFLAGS=-g -pthread -lm -static -lrt 6LDFLAGS=-g -pthread -lm -static -lrt
7LDFLAGS += $(shell pkg-config --libs $(DEPS)) 7LDFLAGS += $(shell pkg-config --static --libs $(DEPS))
8DSO_LDFLAGS=-g -pthread -lm -lrt
9DSO_LDFLAGS += $(shell pkg-config --libs $(DEPS))
8OBJECTS=$(SOURCES:.c=.o) 10OBJECTS=$(SOURCES:.c=.o)
9INCLUDES = $(wildcard *.h) 11INCLUDES = $(wildcard *.h)
10 12
@@ -19,7 +21,10 @@ gitversion.c: gitversion.h
19 $(CC) $(CFLAGS) $< -c -o $@ 21 $(CC) $(CFLAGS) $< -c -o $@
20 22
21tuntox: $(OBJECTS) $(INCLUDES) 23tuntox: $(OBJECTS) $(INCLUDES)
22 $(CC) -o $@ $(OBJECTS) -ltoxcore -lpthread $(LDFLAGS) /usr/local/lib/libsodium.a /usr/local/lib/libtoxcore.a 24 $(CC) -o $@ $(OBJECTS) -lpthread $(LDFLAGS) /usr/local/lib/libtoxmessenger.a /usr/local/lib/libtoxcore.a
25
26tuntox_nostatic: $(OBJECTS) $(INCLUDES)
27 $(CC) -o $@ $(OBJECTS) -lpthread $(DSO_LDFLAGS)
23 28
24cscope.out: 29cscope.out:
25 cscope -bv ./*.[ch] 30 cscope -bv ./*.[ch]