IP to Geo

IP to Geo Git Source Tree

Root/src/Makefile

1
2BIN_DIR =../bin
3SRCS = ip_to_geo.c test.c cmdline.c server.c
4TARGET = $(BIN_DIR)/ip_to_geo
5CFLAGS = -Wall
6LDFLAGS = -lpthread
7
8ifneq ($(DEBUG),)
9CFLAGS += -ggdb -O0
10else
11CFLAGS += -O2
12endif
13
14ifeq ($(USE_SECCOMP),1)
15CFLAGS += -DUSE_SECCOMP=1
16LDFLAGS += -lseccomp
17endif
18
19all: $(BIN_DIR) ip_data.c $(TARGET)
20
21$(BIN_DIR):
22@mkdir $(BIN_DIR)
23
24ip_data.c: $(BIN_DIR)
25make -C ../data
26
27cmdline.c: cmdline.ggo
28gengetopt --input $^
29
30$(TARGET): ip_data.c $(SRCS)
31gcc $(CFLAGS) $(SRCS) $(LDFLAGS) -o $@
32
33clean:
34rm -f *~ $(TARGET)
35
36ultra_clean: clean
37rm -f ip_data.c

Archive Download this file

Branches

Tags