-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 727 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 727 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
36
37
CFLAGS = -W -Wall -Werror -O2 -g
#CFLAGS = -W -Wall -Werror -O0 -g3
#DEBUG_FLAGS = -DDEBUG_TASK -DDEBUG_RUID
SLG_FLAGS = -DHTTP_PROTOCOL -DUSE_RST
#SLG_FLAGS = -DHTTP_PROTOCOL -DUSE_RST
#SLG_FLAGS = -DMEMCACHED_PROTOCOL -DUSE_RST
#-DUSE_RST
#-DHTTP_PROTOCOL
#-DMEMCACHED_PROTOCOL
#-DUSE_RST
LDFLAGS = -lm -lpthread
# Rules
APPS = slg slg_master
all: ${APPS}
CC = gcc
# Build libraries
%.o : %.c %.h master_slave.h debug_tools.h
${CC} $(CFLAGS) $(SLG_FLAGS) $(DEBUG_FLAGS) $(INCFLAGS) -c $<
# Binaries
slg: slg.o circular_buffer.o stats_utils.o debug_tools.o
${CC} -o $@ $^ $(LDFLAGS)
slg_master: slg_master.o stats_utils.o debug_tools.o
${CC} -o $@ $^ $(LDFLAGS)
clean:
rm -f ${APPS}
rm -f *.o
rm -f core*