diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 13 insertions, 7 deletions
@@ -1,14 +1,20 @@ | |||
1 | SOURCES = main.c | 1 | SOURCES = $(wildcard *.c) |
2 | DEPS= | 2 | DEPS=libtoxcore |
3 | CC=gcc | 3 | CC=gcc |
4 | CFLAGS=-g | 4 | CFLAGS=-g #-std=c99 |
5 | CFLAGS += $(shell pkg-config --cflags $(DEPS)) | ||
6 | LDFLAGS=-g -pthread -lm -static | ||
7 | LDFLAGS += $(shell pkg-config --libs $(DEPS)) | ||
5 | OBJECTS=$(SOURCES:.c=.o) | 8 | OBJECTS=$(SOURCES:.c=.o) |
9 | INCLUDES = $(wildcard *.h) | ||
6 | 10 | ||
7 | .c.o: | 11 | .c.o: $(INCLUDES) |
8 | $(CC) $(CFLAGS) $< -c -o $@ | 12 | $(CC) $(CFLAGS) $< -c -o $@ |
9 | 13 | ||
10 | tuntox: $(OBJECTS) | 14 | tuntox: $(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 | ||
13 | all: tuntox | 17 | cscope.out: |
18 | cscope -bv ./*.[ch] | ||
14 | 19 | ||
20 | all: cscope.out tuntox | ||