summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 4 insertions, 16 deletions
diff --git a/Makefile b/Makefile
index 0a972c9..32aadd2 100644
--- a/Makefile
+++ b/Makefile
@@ -3,21 +3,9 @@ INCLUDES = $(wildcard *.h) gitversion.h
3OBJECTS = $(SOURCES:.c=.o) 3OBJECTS = $(SOURCES:.c=.o)
4DEPS = libtoxcore 4DEPS = libtoxcore
5 5
6CFLAGS = $(shell pkg-config --cflags $(DEPS)) 6CFLAGS += $(shell pkg-config --cflags $(DEPS))
7LDFLAGS = $(shell pkg-config --libs $(DEPS)) 7LDFLAGS += $(shell pkg-config --libs $(DEPS))
8LDFLAGS_STATIC = -static -pthread 8LDFLAGS_STATIC += -static -pthread -Wl,-Bstatic $(LDFLAGS)
9
10
11# Check on what platform we are running
12UNAME_M = $(shell uname -m)
13ifeq ($(UNAME_M), x86_64)
14 TOXCORE_STATIC_LIB = /usr/local/lib64/libtoxcore.a
15 SODIUM_STATIC_LIB = /usr/local/lib64/libsodium.a
16endif
17ifneq ($(filter %86, $(UNAME_M)),)
18 TOXCORE_STATIC_LIB = /usr/local/lib/libtoxcore.a
19 SODIUM_STATIC_LIB = /usr/local/lib/libsodium.a
20endif
21 9
22 10
23# Targets 11# Targets
@@ -37,7 +25,7 @@ tuntox: $(OBJECTS) $(INCLUDES)
37 25
38tuntox_static: $(OBJECTS) $(INCLUDES) 26tuntox_static: $(OBJECTS) $(INCLUDES)
39 @echo " LD tuntox" 27 @echo " LD tuntox"
40 @$(CC) $(LDFLAGS_STATIC) $(OBJECTS) -o tuntox $(TOXCORE_STATIC_LIB) $(SODIUM_STATIC_LIB) 28 @$(CC) $(OBJECTS) $(LDFLAGS_STATIC) -o tuntox
41 29
42cscope.out: 30cscope.out:
43 @echo " GEN $@" 31 @echo " GEN $@"