]> git.llucax.com Git - personal/website.git/blob - source/blog/posts/2010/10/10-trying-cdgc-howto/Makefile
Make https:// compatible
[personal/website.git] / source / blog / posts / 2010 / 10 / 10-trying-cdgc-howto / Makefile
1
2 DC     := ../dmd/src/dmd
3 CFLAGS := -O3
4 DFLAGS := -O -release -inline -gc
5 GC     := cdgc
6
7 d_src := \
8         tango/time/Time.d \
9         tango/time/StopWatch.d \
10         tango/time/Clock.d \
11         tango/time/ISO8601.d \
12         tango/time/WallClock.d \
13         tango/time/chrono/GregorianBased.d \
14         tango/time/chrono/Hijri.d \
15         tango/time/chrono/Korean.d \
16         tango/time/chrono/Hebrew.d \
17         tango/time/chrono/ThaiBuddhist.d \
18         tango/time/chrono/Gregorian.d \
19         tango/time/chrono/Taiwan.d \
20         tango/time/chrono/Calendar.d \
21         tango/time/chrono/Japanese.d \
22         tango/util/PathUtil.d \
23         tango/util/digest/MerkleDamgard.d \
24         tango/util/digest/Ripemd128.d \
25         tango/util/digest/Ripemd160.d \
26         tango/util/digest/Sha0.d \
27         tango/util/digest/Sha01.d \
28         tango/util/digest/Md2.d \
29         tango/util/digest/Sha512.d \
30         tango/util/digest/Crc32.d \
31         tango/util/digest/Ripemd320.d \
32         tango/util/digest/Digest.d \
33         tango/util/digest/Ripemd256.d \
34         tango/util/digest/Whirlpool.d \
35         tango/util/digest/Tiger.d \
36         tango/util/digest/Sha256.d \
37         tango/util/digest/Md4.d \
38         tango/util/digest/Sha1.d \
39         tango/util/digest/Md5.d \
40         tango/util/Convert.d \
41         tango/util/encode/Base64.d \
42         tango/util/log/Trace.d \
43         tango/util/log/model/ILogger.d \
44         tango/util/log/AppendFiles.d \
45         tango/util/log/ConfigProps.d \
46         tango/util/log/LayoutDate.d \
47         tango/util/log/LayoutChainsaw.d \
48         tango/util/log/Config.d \
49         tango/util/log/AppendSocket.d \
50         tango/util/log/AppendMail.d \
51         tango/util/log/AppendConsole.d \
52         tango/util/log/Log.d \
53         tango/util/log/AppendFile.d \
54         tango/util/MinMax.d \
55         tango/util/container/model/IContainer.d \
56         tango/util/container/RedBlack.d \
57         tango/util/container/Container.d \
58         tango/util/container/SortedMap.d \
59         tango/util/container/HashMap.d \
60         tango/util/container/HashSet.d \
61         tango/util/container/Slink.d \
62         tango/util/container/CircularList.d \
63         tango/util/container/Clink.d \
64         tango/util/container/LinkedList.d \
65         tango/util/container/more/CacheMap.d \
66         tango/util/container/more/Stack.d \
67         tango/util/container/more/Vector.d \
68         tango/util/container/more/StackMap.d \
69         tango/util/container/more/HashFile.d \
70         tango/util/container/more/Heap.d \
71         tango/util/container/more/BitSet.d \
72         tango/util/ArgParser.d \
73         tango/math/ErrorFunction.d \
74         tango/math/Math.d \
75         tango/math/GammaFunction.d \
76         tango/math/internal/BiguintCore.d \
77         tango/math/internal/BignumX86.d \
78         tango/math/internal/BignumNoAsm.d \
79         tango/math/IEEE.d \
80         tango/math/Probability.d \
81         tango/math/BigInt.d \
82         tango/math/Elliptic.d \
83         tango/math/Bracket.d \
84         tango/math/Bessel.d \
85         tango/math/random/engines/ArraySource.d \
86         tango/math/random/engines/Twister.d \
87         tango/math/random/engines/KissCmwc.d \
88         tango/math/random/engines/URandom.d \
89         tango/math/random/engines/CMWC.d \
90         tango/math/random/engines/KISS.d \
91         tango/math/random/engines/Sync.d \
92         tango/math/random/Twister.d \
93         tango/math/random/Kiss.d \
94         tango/math/random/Ziggurat.d \
95         tango/math/random/Random.d \
96         tango/math/random/NormalSource.d \
97         tango/math/random/ExpSource.d \
98         tango/io/model/IBuffer.d \
99         tango/io/model/IConduit.d \
100         tango/io/model/IFile.d \
101         tango/io/Path.d \
102         tango/io/stream/Format.d \
103         tango/io/stream/Delimiters.d \
104         tango/io/stream/Endian.d \
105         tango/io/stream/Snoop.d \
106         tango/io/stream/Iterator.d \
107         tango/io/stream/Quotes.d \
108         tango/io/stream/Data.d \
109         tango/io/stream/Greedy.d \
110         tango/io/stream/Digester.d \
111         tango/io/stream/Buffered.d \
112         tango/io/stream/DataFile.d \
113         tango/io/stream/Text.d \
114         tango/io/stream/Lines.d \
115         tango/io/stream/Map.d \
116         tango/io/stream/Typed.d \
117         tango/io/stream/TextFile.d \
118         tango/io/stream/Utf.d \
119         tango/io/stream/Patterns.d \
120         tango/io/FilePath.d \
121         tango/io/vfs/model/Vfs.d \
122         tango/io/vfs/LinkedFolder.d \
123         tango/io/vfs/ZipFolder.d \
124         tango/io/vfs/FtpFolder.d \
125         tango/io/vfs/VirtualFolder.d \
126         tango/io/vfs/FileFolder.d \
127         tango/io/compress/BzipStream.d \
128         tango/io/compress/Zip.d \
129         tango/io/compress/ZlibStream.d \
130         tango/io/compress/c/zlib.d \
131         tango/io/compress/c/bzlib.d \
132         tango/io/UnicodeFile.d \
133         tango/io/Console.d \
134         tango/io/Stdout.d \
135         tango/io/device/FileMap.d \
136         tango/io/device/Device.d \
137         tango/io/device/SerialPort.d \
138         tango/io/device/BitBucket.d \
139         tango/io/device/ThreadPipe.d \
140         tango/io/device/TempFile.d \
141         tango/io/device/Conduit.d \
142         tango/io/device/File.d \
143         tango/io/device/Array.d \
144         tango/io/Buffer.d \
145         tango/io/FileScan.d \
146         tango/io/selector/model/ISelector.d \
147         tango/io/selector/PollSelector.d \
148         tango/io/selector/SelectorException.d \
149         tango/io/selector/SelectSelector.d \
150         tango/io/selector/EpollSelector.d \
151         tango/io/selector/Selector.d \
152         tango/io/selector/AbstractSelector.d \
153         tango/io/FileSystem.d \
154         tango/net/model/UriView.d \
155         tango/net/SocketListener.d \
156         tango/net/SSLSocketConduit.d \
157         tango/net/DatagramConduit.d \
158         tango/net/PKI.d \
159         tango/net/SSLServerSocket.d \
160         tango/net/util/PKI.d \
161         tango/net/util/MemCache.d \
162         tango/net/util/c/OpenSSL.d \
163         tango/net/ServerSocket.d \
164         tango/net/SocketConduit.d \
165         tango/net/Socket.d \
166         tango/net/InternetAddress.d \
167         tango/net/http/HttpGet.d \
168         tango/net/http/model/HttpParamsView.d \
169         tango/net/http/HttpTokens.d \
170         tango/net/http/HttpParams.d \
171         tango/net/http/HttpPost.d \
172         tango/net/http/HttpStack.d \
173         tango/net/http/HttpClient.d \
174         tango/net/http/HttpTriplet.d \
175         tango/net/http/HttpConst.d \
176         tango/net/http/HttpHeaders.d \
177         tango/net/http/ChunkStream.d \
178         tango/net/http/HttpCookies.d \
179         tango/net/device/Berkeley.d \
180         tango/net/device/Socket.d \
181         tango/net/device/Multicast.d \
182         tango/net/device/Datagram.d \
183         tango/net/device/LocalSocket.d \
184         tango/net/device/SSLSocket.d \
185         tango/net/MulticastConduit.d \
186         tango/net/Uri.d \
187         tango/net/ftp/FtpClient.d \
188         tango/net/ftp/Telnet.d \
189         tango/text/locale/Win32.d \
190         tango/text/locale/Core.d \
191         tango/text/locale/Convert.d \
192         tango/text/locale/Data.d \
193         tango/text/locale/Collation.d \
194         tango/text/locale/Locale.d \
195         tango/text/locale/Posix.d \
196         tango/text/locale/Parse.d \
197         tango/text/Ascii.d \
198         tango/text/Regex.d \
199         tango/text/Unicode.d \
200         tango/text/Arguments.d \
201         tango/text/Util.d \
202         tango/text/Text.d \
203         tango/text/json/Json.d \
204         tango/text/json/JsonEscape.d \
205         tango/text/json/JsonParser.d \
206         tango/text/convert/Integer.d \
207         tango/text/convert/Format.d \
208         tango/text/convert/TimeStamp.d \
209         tango/text/convert/Float.d \
210         tango/text/convert/UnicodeBom.d \
211         tango/text/convert/DateTime.d \
212         tango/text/convert/Layout.d \
213         tango/text/convert/Utf.d \
214         tango/text/UnicodeData.d \
215         tango/text/xml/DocEntity.d \
216         tango/text/xml/Document.d \
217         tango/text/xml/DocPrinter.d \
218         tango/text/xml/DocTester.d \
219         tango/text/xml/PullParser.d \
220         tango/text/xml/SaxParser.d \
221         tango/text/Search.d \
222         tango/sys/Environment.d \
223         tango/sys/consts/sysctl.d \
224         tango/sys/consts/fcntl.d \
225         tango/sys/consts/unistd.d \
226         tango/sys/consts/errno.d \
227         tango/sys/consts/socket.d \
228         tango/sys/HomeFolder.d \
229         tango/sys/Process.d \
230         tango/sys/SharedLib.d \
231         tango/sys/Pipe.d \
232         tango/sys/Common.d \
233         tango/sys/linux/linux.d \
234         tango/sys/linux/consts/sysctl.d \
235         tango/sys/linux/consts/fcntl.d \
236         tango/sys/linux/consts/unistd.d \
237         tango/sys/linux/consts/errno.d \
238         tango/sys/linux/consts/socket.d \
239         tango/sys/linux/inotify.d \
240         tango/sys/linux/epoll.d \
241         tango/sys/linux/tipc.d \
242         tango/stdc/stddef.d \
243         tango/stdc/stdarg.d \
244         tango/stdc/wctype.d \
245         tango/stdc/tgmath.d \
246         tango/stdc/string.d \
247         tango/stdc/stringz.d \
248         tango/stdc/signal.d \
249         tango/stdc/stdint.d \
250         tango/stdc/time.d \
251         tango/stdc/inttypes.d \
252         tango/stdc/stdlib.d \
253         tango/stdc/math.d \
254         tango/stdc/posix/ucontext.d \
255         tango/stdc/posix/arpa/inet.d \
256         tango/stdc/posix/utime.d \
257         tango/stdc/posix/fcntl.d \
258         tango/stdc/posix/dirent.d \
259         tango/stdc/posix/setjmp.d \
260         tango/stdc/posix/signal.d \
261         tango/stdc/posix/pthread.d \
262         tango/stdc/posix/time.d \
263         tango/stdc/posix/inttypes.d \
264         tango/stdc/posix/netinet/tcp.d \
265         tango/stdc/posix/netinet/in_.d \
266         tango/stdc/posix/stdlib.d \
267         tango/stdc/posix/unistd.d \
268         tango/stdc/posix/config.d \
269         tango/stdc/posix/net/if_.d \
270         tango/stdc/posix/poll.d \
271         tango/stdc/posix/dlfcn.d \
272         tango/stdc/posix/sys/types.d \
273         tango/stdc/posix/sys/stat.d \
274         tango/stdc/posix/sys/select.d \
275         tango/stdc/posix/sys/uio.d \
276         tango/stdc/posix/sys/wait.d \
277         tango/stdc/posix/sys/time.d \
278         tango/stdc/posix/sys/ipc.d \
279         tango/stdc/posix/sys/utsname.d \
280         tango/stdc/posix/sys/socket.d \
281         tango/stdc/posix/sys/mman.d \
282         tango/stdc/posix/sys/shm.d \
283         tango/stdc/posix/sys/statvfs.d \
284         tango/stdc/posix/stdio.d \
285         tango/stdc/posix/langinfo.d \
286         tango/stdc/posix/pwd.d \
287         tango/stdc/posix/semaphore.d \
288         tango/stdc/posix/sched.d \
289         tango/stdc/posix/termios.d \
290         tango/stdc/ctype.d \
291         tango/stdc/errno.d \
292         tango/stdc/complex.d \
293         tango/stdc/config.d \
294         tango/stdc/limits.d \
295         tango/stdc/stdio.d \
296         tango/stdc/locale.d \
297         tango/stdc/fenv.d \
298         tango/core/Runtime.d \
299         tango/core/BitManip.d \
300         tango/core/BitArray.d \
301         tango/core/Signal.d \
302         tango/core/ThreadPool.d \
303         tango/core/Traits.d \
304         tango/core/Exception.d \
305         tango/core/Memory.d \
306         tango/core/Variant.d \
307         tango/core/Atomic.d \
308         tango/core/Vararg.d \
309         tango/core/Tuple.d \
310         tango/core/ByteSwap.d \
311         tango/core/Thread.d \
312         tango/core/sync/Mutex.d \
313         tango/core/sync/Condition.d \
314         tango/core/sync/Semaphore.d \
315         tango/core/sync/Config.d \
316         tango/core/sync/ReadWriteMutex.d \
317         tango/core/sync/Barrier.d \
318         tango/core/Version.d \
319         tango/core/WeakRef.d \
320         tango/core/RuntimeTraits.d \
321         tango/core/tools/LinuxStackTrace.d \
322         tango/core/tools/StackTrace.d \
323         tango/core/tools/Demangler.d \
324         tango/core/tools/TraceExceptions.d \
325         tango/core/tools/Cpuid.d \
326         tango/core/tools/WinStackTrace.d \
327         tango/core/rt/compiler/util/hash.d \
328         tango/core/rt/compiler/util/string.d \
329         tango/core/rt/compiler/util/console.d \
330         tango/core/rt/compiler/util/ctype.d \
331         tango/core/rt/compiler/util/utf.d \
332         tango/core/rt/compiler/util/cpuid.d \
333         tango/core/rt/compiler/dmd/invariant.d \
334         tango/core/rt/compiler/dmd/posix/deh.d \
335         tango/core/rt/compiler/dmd/posix/llmath.d \
336         tango/core/rt/compiler/dmd/typeinfo/ti_float.d \
337         tango/core/rt/compiler/dmd/typeinfo/ti_ubyte.d \
338         tango/core/rt/compiler/dmd/typeinfo/ti_C.d \
339         tango/core/rt/compiler/dmd/typeinfo/ti_short.d \
340         tango/core/rt/compiler/dmd/typeinfo/ti_AC.d \
341         tango/core/rt/compiler/dmd/typeinfo/ti_creal.d \
342         tango/core/rt/compiler/dmd/typeinfo/ti_cdouble.d \
343         tango/core/rt/compiler/dmd/typeinfo/ti_Areal.d \
344         tango/core/rt/compiler/dmd/typeinfo/ti_ushort.d \
345         tango/core/rt/compiler/dmd/typeinfo/ti_void.d \
346         tango/core/rt/compiler/dmd/typeinfo/ti_Along.d \
347         tango/core/rt/compiler/dmd/typeinfo/ti_Adouble.d \
348         tango/core/rt/compiler/dmd/typeinfo/ti_Afloat.d \
349         tango/core/rt/compiler/dmd/typeinfo/ti_dchar.d \
350         tango/core/rt/compiler/dmd/typeinfo/ti_Acreal.d \
351         tango/core/rt/compiler/dmd/typeinfo/ti_Aint.d \
352         tango/core/rt/compiler/dmd/typeinfo/ti_wchar.d \
353         tango/core/rt/compiler/dmd/typeinfo/ti_ulong.d \
354         tango/core/rt/compiler/dmd/typeinfo/ti_Acfloat.d \
355         tango/core/rt/compiler/dmd/typeinfo/ti_Acdouble.d \
356         tango/core/rt/compiler/dmd/typeinfo/ti_idouble.d \
357         tango/core/rt/compiler/dmd/typeinfo/ti_ptr.d \
358         tango/core/rt/compiler/dmd/typeinfo/ti_int.d \
359         tango/core/rt/compiler/dmd/typeinfo/ti_Ashort.d \
360         tango/core/rt/compiler/dmd/typeinfo/ti_delegate.d \
361         tango/core/rt/compiler/dmd/typeinfo/ti_long.d \
362         tango/core/rt/compiler/dmd/typeinfo/ti_Ag.d \
363         tango/core/rt/compiler/dmd/typeinfo/ti_ireal.d \
364         tango/core/rt/compiler/dmd/typeinfo/ti_double.d \
365         tango/core/rt/compiler/dmd/typeinfo/ti_uint.d \
366         tango/core/rt/compiler/dmd/typeinfo/ti_cfloat.d \
367         tango/core/rt/compiler/dmd/typeinfo/ti_real.d \
368         tango/core/rt/compiler/dmd/typeinfo/ti_char.d \
369         tango/core/rt/compiler/dmd/typeinfo/ti_byte.d \
370         tango/core/rt/compiler/dmd/typeinfo/ti_ifloat.d \
371         tango/core/rt/compiler/dmd/object_.d \
372         tango/core/rt/compiler/dmd/rt/aaA.d \
373         tango/core/rt/compiler/dmd/rt/adi.d \
374         tango/core/rt/compiler/dmd/rt/arrayint.d \
375         tango/core/rt/compiler/dmd/rt/cInterface.d \
376         tango/core/rt/compiler/dmd/rt/arraybyte.d \
377         tango/core/rt/compiler/dmd/rt/qsort.d \
378         tango/core/rt/compiler/dmd/rt/trace.d \
379         tango/core/rt/compiler/dmd/rt/cmath2.d \
380         tango/core/rt/compiler/dmd/rt/aApply.d \
381         tango/core/rt/compiler/dmd/rt/invariant_.d \
382         tango/core/rt/compiler/dmd/rt/switch_.d \
383         tango/core/rt/compiler/dmd/rt/cast_.d \
384         tango/core/rt/compiler/dmd/rt/memory.d \
385         tango/core/rt/compiler/dmd/rt/compiler.d \
386         tango/core/rt/compiler/dmd/rt/arraycast.d \
387         tango/core/rt/compiler/dmd/rt/memset.d \
388         tango/core/rt/compiler/dmd/rt/arraydouble.d \
389         tango/core/rt/compiler/dmd/rt/obj.d \
390         tango/core/rt/compiler/dmd/rt/alloca.d \
391         tango/core/rt/compiler/dmd/rt/lifetime.d \
392         tango/core/rt/compiler/dmd/rt/arrayshort.d \
393         tango/core/rt/compiler/dmd/rt/dmain2.d \
394         tango/core/rt/compiler/dmd/rt/aApplyR.d \
395         tango/core/rt/compiler/dmd/rt/arrayfloat.d \
396         tango/core/rt/compiler/dmd/rt/cover.d \
397         tango/core/rt/compiler/dmd/rt/arraycat.d \
398         tango/core/rt/compiler/dmd/rt/arrayreal.d \
399         $(wildcard tango/core/rt/gc/$(GC)/*.d) \
400         tango/core/Array.d
401
402 c_src := \
403         tango/core/rt/compiler/util/wrap.c \
404         tango/core/rt/compiler/dmd/gcosx.c \
405         tango/core/rt/compiler/dmd/complex.c \
406         tango/core/rt/compiler/dmd/cConst.c \
407         tango/core/rt/compiler/dmd/monitor.c \
408         tango/core/rt/compiler/dmd/critical.c
409
410 a_src := \
411         tango/core/rt/compiler/util/ThreadASM.S
412
413 objs := $(addsuffix .o,$(addprefix obj/,$(d_src) $(c_src) $(a_src)))
414
415 lib := obj/libtango-$(GC).a
416
417 override V := $(if $V,,@)
418
419 .PHONY: all
420 all: $(lib)
421
422 obj/%.d.o: %.d
423         @mkdir -p obj/$(<D)
424         $(if $V,@echo $(DC) $@)
425         $V $(DC) -c -Itango/core -Itango/core/rt/compiler/dmd -I. $(DFLAGS) -of$@ $<
426
427 obj/%.c.o: %.c
428         @mkdir -p obj/$(<D)
429         $(if $V,@echo $(CC) $@)
430         $V $(CC) -m32 -c $(CFLAGS) $(CPPFLAGS) -o$@ $<
431
432 obj/%.S.o: %.S
433         @mkdir -p obj/$(<D)
434         $(if $V,@echo $(CC) $@)
435         $V $(CC) -m32 -c $(CFLAGS) $(CPPFLAGS) -fPIC -o$@ $<
436
437 $(lib): $(objs)
438         $(if $V,@echo $(AR) $@)
439         $V $(AR) -r $@ $?
440
441 .PHONY: clean
442 clean:
443         $V $(RM) -r obj
444
445 clean-gc:
446         $V $(RM) -r obj/tango/core/rt/gc
447