forked from seclab-ucr/INTANG
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (24 loc) · 858 Bytes
/
Makefile
File metadata and controls
36 lines (24 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# a lot of flags
INCLUDE_DIRS = -I. -Istrategies
CC = gcc
CUSTOM_DEFINES = #-DEVALUATION# -DTEST
CFLAGS = -g -c $(CUSTOM_DEFINES) $(INCLUDE_DIRS) # -Wall
LDFLAGS = -lnetfilter_queue -lnfnetlink -lhiredis -lev
SOURCES = main.c helper.c logging.c socket.c strategy.c cache.c dns.c dnscli.c feedback.c test.c order.c redis.c memcache.c ttl_probing.c discrepancy.c
STRATEGIES = $(shell find strategies -type f -iname '*.c')
OBJECTS = $(SOURCES:.c=.o) $(STRATEGIES:.c=.o)
EXECUTABLE = intangd
.DEFAULT_GOAL := all
# here come the tagets
all: $(SOURCES) $(STRATEGIES) $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) $(LDFLAGS) -o $@ -pthread
.c.o:
$(CC) $(CFLAGS) $< -o $@ -pthread
#strategies/%.o: strategies/%.c
# $(CC) $(CFLAGS) $< -o $@ -pthread
#strategies:
# cd strategies &&
clean:
find . -name "*.o" | xargs rm
rm $(EXECUTABLE)