forked from prophetss/C-log
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (22 loc) · 641 Bytes
/
Makefile
File metadata and controls
28 lines (22 loc) · 641 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
######################################################
#make parameter
#debug/release
ver = release
######################################################
CC = gcc
DIRS = . ./log ./util ./lz4 ./sample
CFLAGS = -D_DEBUG -O0 -Wall -Wextra -ggdb
INCLUDE_DIR = -I. -I./log -I./util -I./lz4 -I./sample
LIB_L = -lpthread
TARGET = log_sample_d
ifeq ($(ver), release)
CFLAGS = -O2 -Wall -Wextra
TARGET = log_sample_r
endif
FIND_FILES_CPP = $(wildcard $(dir)/*.c)
SOURCES = $(foreach dir, $(DIRS), $(FIND_FILES_CPP))
$(TARGET): $(SOURCES)
$(CC) $(INCLUDE_DIR) $(CFLAGS) -o $@ $^ $(LIB_L)
.PHONY:clean
clean:
rm log_sample_d log_sample