Rev 6554 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6554 | serge | 1 | LIBRARY= libstdc++ |
2 | |||
3 | CC = kos32-gcc |
||
4 | AR = kos32-ar |
||
5 | LD = kos32-ld |
||
6 | CPP= kos32-g++ |
||
7 | STRIP = kos32-strip |
||
8 | |||
9 | INSTALLDIR:= /home/autobuild/tools/win32/mingw32/lib |
||
10 | |||
11 | export SDK_DIR:= $(abspath ../../../../sdk) |
||
12 | |||
13 | CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer |
||
14 | CFLAGS+= -nostdinc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi |
||
15 | CFLAGS+= -fdiagnostics-show-location=once -ffunction-sections -fdata-sections |
||
16 | |||
17 | ARFLAGS= crs |
||
18 | |||
19 | GLIBCXX_INCLUDE_DIR= ./include |
||
20 | INCLUDES= -I./include/mingw32 -I./include -I./libsupc++ -I$(SDK_DIR)/sources/newlib/libc/include |
||
21 | |||
22 | LIBS:= -ldll -lc.dll |
||
23 | |||
24 | GLIBCXX_ABI_FLAGS = -D_GLIBCXX_USE_CXX11_ABI=0 |
||
25 | PARALLEL_FLAGS = -D_GLIBCXX_PARALLEL |
||
26 | |||
27 | DEFINES= -D_GLIBCXX_HAVE_TLS |
||
28 | |||
29 | CXXCOMPILE= $(CPP) $(CFLAGS) $(INCLUDES) $(DEFINES) |
||
30 | |||
31 | |||
32 | cxx98_sources = \ |
||
33 | src/c++98/compatibility.cc \ |
||
34 | src/c++98/compatibility-debug_list.cc \ |
||
35 | src/c++98/compatibility-debug_list-2.cc |
||
36 | |||
37 | cxx11_sources = \ |
||
6556 | serge | 38 | src/c++11/compatibility-c++0x.cc \ |
39 | src/c++11/compatibility-atomic-c++0x.cc \ |
||
40 | src/c++11/compatibility-thread-c++0x.cc \ |
||
41 | src/c++11/compatibility-chrono.cc \ |
||
42 | src/c++11/compatibility-condvar.cc |
||
6554 | serge | 43 | |
6556 | serge | 44 | compat_sources = $(cxx98_sources) $(cxx11_sources) |
6554 | serge | 45 | |
46 | cow_string_host_sources = \ |
||
47 | src/c++98/collate_members_cow.cc \ |
||
48 | src/c++98/messages_members_cow.cc \ |
||
49 | src/c++98/monetary_members_cow.cc \ |
||
50 | src/c++98/numeric_members_cow.cc |
||
51 | |||
52 | |||
53 | # Source files linked in via configuration/make substitution for a |
||
54 | # particular host. |
||
55 | host_sources = \ |
||
56 | $(cow_string_host_sources) \ |
||
57 | src/c++98/atomicity.cc \ |
||
58 | src/c++98/codecvt_members.cc \ |
||
59 | src/c++98/collate_members.cc \ |
||
60 | src/c++98/messages_members.cc \ |
||
61 | src/c++98/monetary_members.cc \ |
||
62 | src/c++98/numeric_members.cc \ |
||
63 | src/c++98/time_members.cc |
||
64 | |||
65 | # Source files linked in via configuration/make substitution for a |
||
66 | # particular host, but with ad hoc naming rules. |
||
67 | host_sources_extra = \ |
||
68 | src/c++98/basic_file.cc src/c++98/c++locale.cc \ |
||
69 | ${inst_sources} ${parallel_sources} |
||
70 | |||
71 | cxx11_abi_sources = \ |
||
72 | src/c++98/cow-istream-string.cc |
||
73 | |||
74 | |||
75 | inst_sources = \ |
||
76 | src/c++98/allocator-inst.cc \ |
||
77 | src/c++98/concept-inst.cc \ |
||
78 | src/c++98/ext-inst.cc \ |
||
79 | src/c++98/misc-inst.cc \ |
||
80 | |||
81 | parallel_sources = src/c++98/parallel_settings.cc |
||
82 | |||
83 | sources = \ |
||
84 | src/c++98/bitmap_allocator.cc \ |
||
85 | src/c++98/pool_allocator.cc \ |
||
86 | src/c++98/mt_allocator.cc \ |
||
87 | src/c++98/codecvt.cc \ |
||
88 | src/c++98/complex_io.cc \ |
||
89 | src/c++98/globals_io.cc \ |
||
90 | src/c++98/hash_tr1.cc \ |
||
91 | src/c++98/hashtable_tr1.cc \ |
||
92 | src/c++98/ios_failure.cc \ |
||
93 | src/c++98/ios_init.cc \ |
||
94 | src/c++98/ios_locale.cc \ |
||
95 | src/c++98/list.cc \ |
||
96 | src/c++98/list-aux.cc \ |
||
97 | src/c++98/list-aux-2.cc \ |
||
98 | src/c++98/list_associated.cc \ |
||
99 | src/c++98/list_associated-2.cc \ |
||
100 | src/c++98/locale.cc \ |
||
101 | src/c++98/locale_init.cc \ |
||
102 | src/c++98/locale_facets.cc \ |
||
103 | src/c++98/localename.cc \ |
||
104 | src/c++98/math_stubs_float.cc \ |
||
105 | src/c++98/math_stubs_long_double.cc \ |
||
106 | src/c++98/stdexcept.cc \ |
||
107 | src/c++98/strstream.cc \ |
||
108 | src/c++98/tree.cc \ |
||
109 | src/c++98/istream.cc \ |
||
110 | src/c++98/istream-string.cc \ |
||
111 | src/c++98/streambuf.cc \ |
||
112 | src/c++98/valarray.cc \ |
||
113 | ${cxx11_abi_sources} \ |
||
114 | ${host_sources} \ |
||
115 | ${host_sources_extra} |
||
116 | |||
117 | |||
118 | host_sources_11 = \ |
||
119 | src/c++11/ctype_configure_char.cc \ |
||
120 | src/c++11/ctype_members.cc |
||
121 | |||
122 | cxx11_abi_sources_11 = \ |
||
123 | src/c++11/cow-locale_init.cc \ |
||
124 | src/c++11/cow-shim_facets.cc \ |
||
125 | src/c++11/cxx11-hash_tr1.cc \ |
||
126 | src/c++11/cxx11-ios_failure.cc \ |
||
127 | src/c++11/cxx11-shim_facets.cc \ |
||
128 | src/c++11/cxx11-stdexcept.cc |
||
129 | |||
130 | sources_11 = \ |
||
131 | src/c++11/chrono.cc \ |
||
132 | src/c++11/codecvt.cc \ |
||
133 | src/c++11/condition_variable.cc \ |
||
134 | src/c++11/cow-stdexcept.cc \ |
||
135 | src/c++11/ctype.cc \ |
||
136 | src/c++11/debug.cc \ |
||
137 | src/c++11/functexcept.cc \ |
||
138 | src/c++11/functional.cc \ |
||
139 | src/c++11/futex.cc \ |
||
140 | src/c++11/future.cc \ |
||
141 | src/c++11/hash_c++0x.cc \ |
||
142 | src/c++11/hashtable_c++0x.cc \ |
||
143 | src/c++11/ios.cc \ |
||
144 | src/c++11/limits.cc \ |
||
145 | src/c++11/mutex.cc \ |
||
146 | src/c++11/placeholders.cc \ |
||
147 | src/c++11/random.cc \ |
||
148 | src/c++11/regex.cc \ |
||
149 | src/c++11/shared_ptr.cc \ |
||
150 | src/c++11/snprintf_lite.cc \ |
||
151 | src/c++11/system_error.cc \ |
||
152 | src/c++11/thread.cc \ |
||
153 | ${cxx11_abi_sources_11} \ |
||
154 | ${host_sources_11} |
||
155 | |||
156 | |||
157 | extra_string_inst_sources = \ |
||
158 | src/c++11/cow-fstream-inst.cc \ |
||
159 | src/c++11/cow-sstream-inst.cc \ |
||
160 | src/c++11/cow-string-inst.cc \ |
||
161 | src/c++11/cow-wstring-inst.cc \ |
||
162 | src/c++11/cxx11-locale-inst.cc \ |
||
163 | src/c++11/cxx11-wlocale-inst.cc |
||
164 | |||
165 | inst_sources_11 = \ |
||
166 | $(extra_string_inst_sources) \ |
||
167 | src/c++11/ext11-inst.cc \ |
||
168 | src/c++11/fstream-inst.cc \ |
||
169 | src/c++11/ios-inst.cc \ |
||
170 | src/c++11/iostream-inst.cc \ |
||
171 | src/c++11/istream-inst.cc \ |
||
172 | src/c++11/locale-inst.cc \ |
||
173 | src/c++11/ostream-inst.cc \ |
||
174 | src/c++11/sstream-inst.cc \ |
||
175 | src/c++11/streambuf-inst.cc \ |
||
176 | src/c++11/string-inst.cc \ |
||
177 | src/c++11/wlocale-inst.cc \ |
||
178 | src/c++11/wstring-inst.cc |
||
179 | |||
180 | sources_11+= $(inst_sources_11) |
||
181 | |||
182 | OBJ98 = $(patsubst %.cc, %.o, $(patsubst %.c, %.o, $(sources))) |
||
183 | |||
184 | OBJ11 = $(patsubst %.cc, %.o, $(patsubst %.c, %.o, $(sources_11))) |
||
185 | |||
186 | com_obj = $(patsubst %.cc, %.o, $(patsubst %.c, %.o, $(compat_sources))) |
||
187 | |||
188 | # targets |
||
189 | |||
190 | all:$(LIBRARY).a |
||
191 | |||
192 | #$(LIBRARY).a: $(OBJ98) $(OBJ11) $(com_obj) Makefile |
||
193 | |||
194 | $(LIBRARY).a: $(OBJ98) $(OBJ11) $(com_obj) Makefile |
||
195 | $(AR) $(ARFLAGS) $(LIBRARY).a $(OBJ98) $(OBJ11) $(com_obj) |
||
196 | mv -f $(LIBRARY).a $(INSTALLDIR) |
||
197 | |||
198 | %.o : %.c Makefile |
||
199 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< |
||
200 | |||
201 | #src/%.o : src/%.cc Makefile |
||
202 | # $(CXXCOMPILE) -o $@ $< |
||
203 | |||
204 | |||
205 | |||
206 | src/c++98/%.o : src/c++98/%.cc Makefile |
||
207 | $(CXXCOMPILE) -o $@ $< |
||
208 | |||
209 | src/c++11/%.o : src/c++11/%.cc Makefile |
||
210 | $(CXXCOMPILE) -std=gnu++11 -o $@ $< |
||
211 | |||
212 | src/c++98/collate_members_cow.o: src/c++98/collate_members_cow.cc |
||
213 | $(CXXCOMPILE) $(GLIBCXX_ABI_FLAGS) -fimplicit-templates -o $@ $< |
||
214 | |||
215 | src/c++98/messages_members_cow.o: src/c++98/messages_members_cow.cc |
||
216 | $(CXXCOMPILE) $(GLIBCXX_ABI_FLAGS) -fimplicit-templates -o $@ $< |
||
217 | |||
218 | src/c++98/monetary_members_cow.o: src/c++98/monetary_members_cow.cc |
||
219 | $(CXXCOMPILE) $(GLIBCXX_ABI_FLAGS) -fimplicit-templates -o $@ $< |
||
220 | |||
221 | src/c++98/numeric_members_cow.o: src/c++98/numeric_members_cow.cc |
||
222 | $(CXXCOMPILE) $(GLIBCXX_ABI_FLAGS) -fimplicit-templates -o $@ $< |
||
223 | |||
224 | src/c++98/locale_init.o: src/c++98/locale_init.cc |
||
225 | $(CXXCOMPILE) -std=gnu++11 -o $@ $< |
||
226 | |||
227 | src/c++98/localename.o: src/c++98/localename.cc |
||
228 | $(CXXCOMPILE) -std=gnu++11 -o $@ $< |
||
229 | |||
230 | src/c++98/strstream.o: src/c++98/strstream.cc Makefile |
||
231 | $(CXXCOMPILE) -I$(GLIBCXX_INCLUDE_DIR)/backward -Wno-deprecated -o $@ $< |
||
232 | |||
233 | # Use special rules for the concept-checking instantiations so that all |
||
234 | |||
235 | # the generated template functions are also instantiated. Force the checks |
||
236 | |||
237 | # to be on so that the instantiations are actually seen. |
||
238 | |||
239 | src/c++98/concept-inst.o: src/c++98/concept-inst.cc |
||
240 | $(CXXCOMPILE) -D_GLIBCXX_CONCEPT_CHECKS -fimplicit-templates -o $@ $< |
||
241 | |||
242 | src/c++98/parallel_settings.o: src/c++98/parallel_settings.cc |
||
243 | $(CXXCOMPILE) $(PARALLEL_FLAGS) -o $@ $< |
||
244 | |||
245 | |||
246 | src/c++11/hashtable_c++0x.o: src/c++11/hashtable_c++0x.cc |
||
6556 | serge | 247 | $(CXXCOMPILE) -std=gnu++11 -fimplicit-templates -o $@ $< |
6554 | serge | 248 | |
6556 | serge | 249 | src/c++11/compatibility-c++0x.o: src/c++11/compatibility-c++0x.cc |
250 | $(CXXCOMPILE) -std=gnu++11 -o $@ $< |
||
251 | |||
252 | src/c++11/compatibility-thread-c++0x.o: src/c++11/compatibility-thread-c++0x.cc |
||
253 | $(CXXCOMPILE) -std=gnu++11 -o $@ $< |
||
254 | |||
255 | src/c++11/compatibility-chrono.o: src/c++11/compatibility-chrono.cc |
||
256 | $(CXXCOMPILE) -std=gnu++11 -o $@ $< |
||
257 | |||
258 | src/c++11/compatibility-condvar.o: src/c++11/compatibility-condvar.cc |
||
259 | $(CXXCOMPILE) -std=gnu++11 -o $@ $< |
||
260 | |||
6554 | serge | 261 | clean: |
262 | -rm -f *.o |
||
263 |