forked from APN-Pucky/tyrant_optimize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile-debug.linux
31 lines (24 loc) · 787 Bytes
/
Makefile-debug.linux
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
MAIN := tuo-debug
SRCS := $(wildcard *.cpp)
OBJS := $(patsubst %.cpp,obj-debug/%.o,$(SRCS))
INCS := $(wildcard *.h)
ifndef VERSION
VERSION = $(shell git describe --tags --abbrev=0 --dirty)
ifeq ($(VERSION),)
VERSION=NO VERSION
${warning "VERSION is not set (USING NO VERSION instead), use make VERSION=vX.XX.X"}
endif
endif
CPPFLAGS := -Wall -Werror -std=gnu++11 -Ofast -g -DTYRANT_OPTIMIZER_VERSION='"$(VERSION)--debug"'
LDFLAGS := -lboost_system -lboost_thread -lboost_filesystem -lboost_regex -lboost_timer -lpthread
all: $(MAIN)
obj-debug/.stamp:
mkdir -p obj-debug
touch obj-debug/.stamp
obj-debug/%.o: %.cpp $(INCS) obj-debug/.stamp
$(CXX) $(CPPFLAGS) -o $@ -c $<
$(MAIN): $(OBJS)
$(CXX) -o $@ $(OBJS) $(LDFLAGS)
rebuild: clean all
clean:
rm -rf $(MAIN) obj-debug/*.o