-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (49 loc) · 1.25 KB
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
OSL_HOME = ../..
-include makefile.local
-include $(OSL_HOME)/makefile.local
include $(OSL_HOME)/makefile.conf
ifdef PROFILE
RELEASE = true
endif
#
all:
$(MAKE) programs
programs: master client histogram
ifdef PROFILE
PROF = $(PROFILE_FLAGS)
LDFLAGS += $(PROF)
endif
LOADLIBES += -lhiredis -lglog \
-lboost_thread$(BOOST_POSTFIX_MT) -lboost_program_options$(BOOST_POSTFIX) -lpthread
## #gcc
OTHERFLAGS = -pipe $(CPUOPTION)
ifdef DEBUG
CXXOPTFLAGS = -O
OTHERFLAGS += -g -DDEBUG
else
CXXOPTFLAGS = $(RELEASE_CXX_OPTFLAGS)
WARNING_FLAGS += $(WARN_INLINE)
ifdef RELEASE
OTHERFLAGS += -DNDEBUG
endif
ifndef PROF
CXXOPTFLAGS += -fomit-frame-pointer
endif
endif
CXXFLAGS = $(PROF) $(OTHERFLAGS) $(CXXOPTFLAGS) $(WARNING_FLAGS) $(INCLUDES)
PROGRAM_SRCS = master.cc client.cc
SRCS = $(PROGRAM_SRCS)
OBJS = $(patsubst %.cc,%.o,$(SRCS))
CC = $(CXX)
PROGRAMS = $(PROGRAM_SRCS:.cc=)
OSL_HOME_FLAGS = -DOSL_HOME=\"$(shell dirname `dirname \`pwd\``)/osl\"
master: redis.o searchResult.o $(FILE_OSL_ALL)
client: redis.o searchResult.o $(FILE_OSL_ALL)
histogram: redis.o searchResult.o $(FILE_OSL_ALL)
clean: light-clean
-rm *.o $(PROGRAMS)
-rm -f core
light-clean:
-rm -rf .deps .objs .gch
-include $(patsubst %.cc,.deps/%.cc.d,$(SRCS))
.PHONY: all clean light-clean