File: makefile.conf

package info (click to toggle)
libosl 0.8.0-1.4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,208 kB
  • ctags: 13,120
  • sloc: cpp: 114,344; ruby: 1,290; ansic: 915; makefile: 430; perl: 309; sh: 35
file content (196 lines) | stat: -rw-r--r-- 5,753 bytes parent folder | download
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
CXX = g++ -DOSL_SMP
GXX = g++ -DOSL_SMP
ARC ?= ar cru
RANLIB ?= ranlib
INCLUDES = -I..

CPUOPTION ?=
RELEASE_CXX_OPTFLAGS = -O3 -DNDEBUG $(CPUOPTION) -g 
ifneq ("$(strip $(DEBUG))","")
CXXFLAGS += -O -g $(INCLUDES)
else
CXXFLAGS += $(RELEASE_CXX_OPTFLAGS) $(INCLUDES)
endif
CXX_CPP_FLAGS = $(INCLUDES)

FILE_OSL_CORE =
FILE_OSL_STD =
FILE_OSL_FULL =
FILE_OSL_ALL =

PROFILE_USE = -fprofile-use -fprofile-correction
PROFILE_GENERATE = -fprofile-generate 

BOOST_LIBS = -lboost_filesystem -lboost_serialization -lboost_iostreams -lboost_date_time -lboost_system
PTHREAD_LIBS = -lpthread
LDLIBS += $(PTHREAD_LIBS)

%.s: %.cc %.o
	$(CXX) -S $(CXXFLAGS) $<
%.e: %.cc
	$(CXX) -E -o $@ $(CXXFLAGS) $<

.deps/%.cc.d: %.cc
	if [ ! -d `dirname $@` ]; then mkdir -p `dirname $@`; fi; 
	$(GXX) -MM $(CXX_CPP_FLAGS) $< \
		| sed 's/\(.*\.o\)[ :]*/$(subst /,\/,$(patsubst .deps/%.cc.d,%.o,$@)) $(subst /,\/,$@) : /g' > $@
	grep $< $@ > /dev/null 2>&1 || (rm -f $@; false)

libosl_%.a:
	$(ARC) $@ $^
	-$(RANLIB) $@


#LIBOSL_BOARD  = libosl_board.a
#LIBOSL_SEARCH = libosl_search.a
#
#### tests for user defiend variables (better than nothing)
#ifneq ($(strip $(USE_TCMALLOC)),$(USE_TCMALLOC))
#$(error variable USE_TCMALLOC has white space(s))
#endif
#ifneq ($(strip $(USE_TBB_SCALABLE_ALLOCATOR)),$(USE_TBB_SCALABLE_ALLOCATOR))
#$(error variable USE_TBB_SCALABLE_ALLOCATOR has white space(s))
#endif
#ifneq ($(strip $(USE_TBB)),$(USE_TBB))
#$(error variable USE_TBB has white space(s))
#endif
#ifneq ($(strip $(USE_BOOST_POOL_ALLOCATOR)),$(USE_BOOST_POOL_ALLOCATOR))
#$(error variable USE_BOOST_POOL_ALLOCATOR has white space(s))
#endif
#
####
#ifneq ($(CXX),icc)
#CPUOPTION  ?= -march=native
#else
#CPUOPTION ?= -gxx-name=g++-4.2
#endif
#CPUOPTION += -std=c++11
#GXX	 ?= g++
#CXX      ?= $(GXX)
## CXX_HOME ?= # default は空
#USE_GCH ?= no
#USE_BOOST_POOL_ALLOCATOR ?= 0
#USE_TBB_SCALABLE_ALLOCATOR ?= 0
#USE_TCMALLOC ?= 1
#TCMALLOC ?= google-perftools-1.7
#USE_TBB ?= 0
#GTEST ?= gtest-1.1.0
#PROTOBUF ?= protobuf-2.1.0
#GPSSHOGI_HOME ?= $(OSL_HOME)/../gpsshogi
#RPATH ?= -Wl,-rpath,
#ifdef CXX_HOME
#LDFLAGS_LOCAL ?= -L$(CXX_HOME)/lib $(RPATH)$(CXX_HOME)/lib
#endif
#BOOST_POSTFIX_MT ?= $(BOOST_POSTFIX)
#LDLIBS += -lboost_filesystem$(BOOST_POSTFIX) -lboost_serialization$(BOOST_POSTFIX) -lboost_iostreams$(BOOST_POSTFIX) -lboost_date_time$(BOOST_POSTFIX) -lboost_system$(BOOST_POSTFIX)
#
#ARC ?= ar cru
#RANLIB ?= ranlib
#DEBUGFLAGS ?= -g
#
#ifdef PROFILE
#OSL_LIB_DIR=$(OSL_HOME)/profile
#else
#ifdef RELEASE
#OSL_LIB_DIR=$(OSL_HOME)/release
#else
#OSL_LIB_DIR=$(OSL_HOME)/lib
#endif
#endif
#
#FILE_OSL_BOARD  = $(OSL_LIB_DIR)/libosl_board.a
#FILE_OSL_SEARCH = $(OSL_LIB_DIR)/libosl_search.a
#FILE_OSL_ALL = $(FILE_OSL_SEARCH) $(FILE_OSL_BOARD)
#
#
#OSL_ADD_INCLUDE_DIR = $(OSL_HOME)/include
#INCLUDES += -I$(OSL_ADD_INCLUDE_DIR) -D_REENTRANT
#LDFLAGS +=  -L$(OSL_LIB_DIR)
#
#ifeq ($(USE_BOOST_POOL_ALLOCATOR),1)
#INCLUDES += -I$(GPSSHOGI_HOME)/include -DUSE_BOOST_POOL_ALLOCATOR
#endif
#ifeq ($(USE_TBB_SCALABLE_ALLOCATOR),1)
#INCLUDES += -DUSE_TBB_SCALABLE_ALLOCATOR
#LOADLIBES += -ltbbmalloc
#endif
#ifeq ($(USE_TCMALLOC),1)
#ifneq (,$(findstring perftools-,$(TCMALLOC)))
#FILE_TCMALLOC ?= $(OSL_HOME)/lib/third_party/$(TCMALLOC)/.libs/libtcmalloc_minimal.a
#else
#FILE_TCMALLOC ?= $(OSL_HOME)/lib/third_party/$(TCMALLOC)/libtcmalloc.a
#endif
#FILE_OSL_BOARD += $(FILE_TCMALLOC)
#endif
#ifeq ($(USE_TBB),1)
#INCLUDES += -DOSL_USE_TBB
#LOADLIBES += -ltbb
#endif
#LDLIBS += -lpthread
#
#CXX_CPP_FLAGS = $(filter-out -I.gch,$(CXXFLAGS))
#CXX_CPP_HEADER_FLAGS = -x c++-header
#
#ifdef CXX_HOME
#INCLUDES += -I$(CXX_HOME)/include
#endif
#
#WARN_INLINE ?=
## -Winline
#WCAST_ALIGN ?= -Wcast-align 
#ifeq ($(CXX),icc)
#PROFILE_USE = -prof-use
#PROFILE_GENERATE = -prof-gen
#INCLUDES += -gcc-sys
#WARNING_FLAGS = -w1 
#RELEASE_CXX_OPTFLAGS ?= -fast -mcmodel=medium
#LDFLAGS +=  -L/opt/intel/Compiler/11.0/081/lib/intel64/
#else
#WARNING_FLAGS += -Wall -Wwrite-strings -Wextra -Wstrict-aliasing=2 -Woverloaded-virtual \
# -Wwrite-strings -Wpointer-arith $(WARN_UNUSED) $(WARN_FIELD_INITIALIZER)
#WARN_UNUSED ?= -Wno-unused-parameter
#WARN_FIELD_INITIALIZER ?= -Wno-missing-field-initializers
#
#RELEASE_CXX_OPTFLAGS ?= -O3 -funroll-loops  -funswitch-loops -fpeel-loops \
#--param large-function-growth=48000 \
#--param inline-unit-growth=8000 --param max-inline-insns-single=8000
#endif
#
##PROFILE_FLAGS ?= -g -pg
#PROFILE_FLAGS ?= -g 
#ifdef PROFILE
#PROF = $(PROFILE_FLAGS)
#endif
#
## gcc 3.4
#ifeq ($(USE_GCH),yes)
#GCH_INCLUDES = -I$(OSL_LIB_DIR)/.gch -Winvalid-pch
#endif
#
#
#HEADERS = $(shell (cd $(OSL_HOME)/include; find . -name "*.h" -o -name "*.tcc"))
#LDFLAGS +=  $(LDFLAGS_LOCAL) $(PROF)
#
#.deps/%.tcc.d: $(OSL_HOME)/include/%.tcc
#	if [ ! -d `dirname $@` ]; then mkdir -p `dirname $@`; fi; 
#	$(GXX) -MM $(CXX_CPP_FLAGS) $(CXX_CPP_HEADER_FLAGS) $< \
#		| sed 's/\(.*\.o\)[ :]*/$(subst /,\/,$(patsubst .deps/%.tcc.d,.gch/%.tcc.gch,$@)) $(subst /,\/,$@) : /g' > $@
#	grep $< $@ > /dev/null 2>&1 || (rm -f $@; false)
#
#ifeq ($(USE_GCH),yes)
#.deps/%.h.d: $(OSL_HOME)/include/%.h
#	if [ ! -d `dirname $@` ]; then mkdir -p `dirname $@`; fi; 
#	$(GXX) -MM $(CXX_CPP_FLAGS) $(CXX_CPP_HEADER_FLAGS) $< \
#		| sed 's/\(.*\.o\)[ :]*/$(subst /,\/,$(patsubst .deps/%.h.d,.gch/%.h.gch,$@)) $(subst /,\/,$@) : /g' > $@
#	grep $< $@ > /dev/null 2>&1 || (rm -f $@; false)
#.gch/%.h.gch: $(OSL_HOME)/include/%.h
#	if [ ! -d `dirname $@` ]; then mkdir -p `dirname $@`; fi; 
#	$(GXX) -o $@ -c $(CXX_CPP_FLAGS) $(CXX_CPP_HEADER_FLAGS) $< 
#.gch/%.tcc.gch: $(OSL_HOME)/include/%.tcc
#	if [ ! -d `dirname $@` ]; then mkdir -p `dirname $@`; fi; 
#	$(GXX) -o $@ -c $(CXX_CPP_FLAGS) $(CXX_CPP_HEADER_FLAGS) $< 
#endif

# ;;; Local Variables:
# ;;; coding:utf-8
# ;;; End: