Mercurial > projects > ldc
comparison druntime/src/common/win32.mak @ 1458:e0b2d67cfe7c
Added druntime (this should be removed once it works).
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Tue, 02 Jun 2009 17:43:06 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1456:7b218ec1044f | 1458:e0b2d67cfe7c |
---|---|
1 # Makefile to build the D runtime library core components for Posix | |
2 # Designed to work with GNU make | |
3 # Targets: | |
4 # make | |
5 # Same as make all | |
6 # make debug | |
7 # Build the debug version of the library | |
8 # make release | |
9 # Build the release version of the library | |
10 # make doc | |
11 # Generate documentation | |
12 # make clean | |
13 # Delete all files created by build process | |
14 | |
15 # Essentials | |
16 | |
17 LIBDIR=..\..\lib | |
18 DOCDIR=..\..\doc | |
19 IMPDIR=..\..\import | |
20 LIBBASENAME=druntime_core.lib | |
21 #MODULES=bitop exception memory runtime thread vararg \ | |
22 # $(addprefix sync/,barrier condition config exception mutex rwmutex semaphore) | |
23 BUILDS=debug release unittest | |
24 | |
25 # Symbols | |
26 | |
27 CC=dmc | |
28 DMD=dmd | |
29 DOCFLAGS=-version=DDoc | |
30 DFLAGS_release=-d -release -O -inline -w -nofloat | |
31 DFLAGS_debug=-d -g -w -nofloat | |
32 DFLAGS_unittest=$(DFLAGS_release) -unittest | |
33 CFLAGS_release=-mn -6 -r | |
34 CFLAGS_debug=-g -mn -6 -r | |
35 CFLAGS_unittest=$(CFLAGS_release) | |
36 | |
37 # Derived symbols | |
38 | |
39 C_SRCS=core\stdc\errno.c | |
40 | |
41 C_OBJS=errno.obj | |
42 | |
43 D_SRCS=\ | |
44 core\bitop.d \ | |
45 core\exception.d \ | |
46 core\memory.d \ | |
47 core\runtime.d \ | |
48 core\thread.d \ | |
49 core\vararg.d \ | |
50 \ | |
51 core\sync\barrier.d \ | |
52 core\sync\condition.d \ | |
53 core\sync\config.d \ | |
54 core\sync\exception.d \ | |
55 core\sync\mutex.d \ | |
56 core\sync\rwmutex.d \ | |
57 core\sync\semaphore.d \ | |
58 \ | |
59 $(IMPDIR)\core\stdc\math.d \ | |
60 $(IMPDIR)\core\stdc\stdarg.d \ | |
61 $(IMPDIR)\core\stdc\stdio.d \ | |
62 $(IMPDIR)\core\stdc\wchar_.d \ | |
63 \ | |
64 $(IMPDIR)\core\sys\windows\windows.d | |
65 | |
66 DOCS=\ | |
67 $(DOCDIR)\core\bitop.html \ | |
68 $(DOCDIR)\core\exception.html \ | |
69 $(DOCDIR)\core\memory.html \ | |
70 $(DOCDIR)\core\runtime.html \ | |
71 $(DOCDIR)\core\thread.html \ | |
72 $(DOCDIR)\core\vararg.html \ | |
73 \ | |
74 $(DOCDIR)\core\sync\barrier.html \ | |
75 $(DOCDIR)\core\sync\condition.html \ | |
76 $(DOCDIR)\core\sync\config.html \ | |
77 $(DOCDIR)\core\sync\exception.html \ | |
78 $(DOCDIR)\core\sync\mutex.html \ | |
79 $(DOCDIR)\core\sync\rwmutex.html \ | |
80 $(DOCDIR)\core\sync\semaphore.html | |
81 | |
82 IMPORTS=\ | |
83 $(IMPDIR)\core\exception.di \ | |
84 $(IMPDIR)\core\memory.di \ | |
85 $(IMPDIR)\core\runtime.di \ | |
86 $(IMPDIR)\core\thread.di \ | |
87 $(IMPDIR)\core\vararg.di \ | |
88 \ | |
89 $(IMPDIR)\core\sync\barrier.di \ | |
90 $(IMPDIR)\core\sync\condition.di \ | |
91 $(IMPDIR)\core\sync\config.di \ | |
92 $(IMPDIR)\core\sync\exception.di \ | |
93 $(IMPDIR)\core\sync\mutex.di \ | |
94 $(IMPDIR)\core\sync\rwmutex.di \ | |
95 $(IMPDIR)\core\sync\semaphore.di | |
96 # bitop.di is already published | |
97 | |
98 ALLLIBS=\ | |
99 $(LIBDIR)\debug\$(LIBBASENAME) \ | |
100 $(LIBDIR)\release\$(LIBBASENAME) \ | |
101 $(LIBDIR)\unittest\$(LIBBASENAME) | |
102 | |
103 # Patterns | |
104 | |
105 #$(LIBDIR)\%\$(LIBBASENAME) : $(D_SRCS) $(C_SRCS) | |
106 # $(CC) -c $(CFLAGS_$*) $(C_SRCS) | |
107 # $(DMD) $(DFLAGS_$*) -lib -of$@ $(D_SRCS) $(C_OBJS) | |
108 # del $(C_OBJS) | |
109 | |
110 #$(DOCDIR)\%.html : %.d | |
111 # $(DMD) -c -d -o- -Df$@ $< | |
112 | |
113 #$(IMPDIR)\%.di : %.d | |
114 # $(DMD) -c -d -o- -Hf$@ $< | |
115 | |
116 # Patterns - debug | |
117 | |
118 $(LIBDIR)\debug\$(LIBBASENAME) : $(D_SRCS) $(C_SRCS) | |
119 $(CC) -c $(CFLAGS_debug) $(C_SRCS) | |
120 $(DMD) $(DFLAGS_debug) -lib -of$@ $(D_SRCS) $(C_OBJS) | |
121 del $(C_OBJS) | |
122 | |
123 # Patterns - release | |
124 | |
125 $(LIBDIR)\release\$(LIBBASENAME) : $(D_SRCS) $(C_SRCS) | |
126 $(CC) -c $(CFLAGS_release) $(C_SRCS) | |
127 $(DMD) $(DFLAGS_release) -lib -of$@ $(D_SRCS) $(C_OBJS) | |
128 del $(C_OBJS) | |
129 | |
130 # Patterns - unittest | |
131 | |
132 $(LIBDIR)\unittest\$(LIBBASENAME) : $(D_SRCS) $(C_SRCS) | |
133 $(CC) -c $(CFLAGS_unittest) $(C_SRCS) | |
134 $(DMD) $(DFLAGS_unittest) -lib -of$@ $(D_SRCS) $(C_OBJS) | |
135 del $(C_OBJS) | |
136 | |
137 # Patterns - docs | |
138 | |
139 $(DOCDIR)\core\bitop.html : core\bitop.d | |
140 $(DMD) -c -d -o- -Df$@ $** | |
141 | |
142 $(DOCDIR)\core\exception.html : core\exception.d | |
143 $(DMD) -c -d -o- -Df$@ $** | |
144 | |
145 $(DOCDIR)\core\memory.html : core\memory.d | |
146 $(DMD) -c -d -o- -Df$@ $** | |
147 | |
148 $(DOCDIR)\core\runtime.html : core\runtime.d | |
149 $(DMD) -c -d -o- -Df$@ $** | |
150 | |
151 $(DOCDIR)\core\thread.html : core\thread.d | |
152 $(DMD) -c -d -o- -Df$@ $** | |
153 | |
154 $(DOCDIR)\core\vararg.html : core\vararg.d | |
155 $(DMD) -c -d -o- -Df$@ $** | |
156 | |
157 $(DOCDIR)\core\sync\barrier.html : core\sync\barrier.d | |
158 $(DMD) -c -d -o- -Df$@ $** | |
159 | |
160 $(DOCDIR)\core\sync\condition.html : core\sync\condition.d | |
161 $(DMD) -c -d -o- -Df$@ $** | |
162 | |
163 $(DOCDIR)\core\sync\config.html : core\sync\config.d | |
164 $(DMD) -c -d -o- -Df$@ $** | |
165 | |
166 $(DOCDIR)\core\sync\exception.html : core\sync\exception.d | |
167 $(DMD) -c -d -o- -Df$@ $** | |
168 | |
169 $(DOCDIR)\core\sync\mutex.html : core\sync\mutex.d | |
170 $(DMD) -c -d -o- -Df$@ $** | |
171 | |
172 $(DOCDIR)\core\sync\rwmutex.html : core\sync\rwmutex.d | |
173 $(DMD) -c -d -o- -Df$@ $** | |
174 | |
175 $(DOCDIR)\core\sync\semaphore.html : core\sync\semaphore.d | |
176 $(DMD) -c -d -o- -Df$@ $** | |
177 | |
178 # Patterns - imports | |
179 | |
180 $(IMPDIR)\core\exception.di : core\exception.d | |
181 $(DMD) -c -d -o- -Hf$@ $** | |
182 | |
183 $(IMPDIR)\core\memory.di : core\memory.d | |
184 $(DMD) -c -d -o- -Hf$@ $** | |
185 | |
186 $(IMPDIR)\core\runtime.di : core\runtime.d | |
187 $(DMD) -c -d -o- -Hf$@ $** | |
188 | |
189 $(IMPDIR)\core\thread.di : core\thread.d | |
190 $(DMD) -c -d -o- -Hf$@ $** | |
191 | |
192 $(IMPDIR)\core\vararg.di : core\vararg.d | |
193 $(DMD) -c -d -o- -Hf$@ $** | |
194 | |
195 $(IMPDIR)\core\sync\barrier.di : core\sync\barrier.d | |
196 $(DMD) -c -d -o- -Hf$@ $** | |
197 | |
198 $(IMPDIR)\core\sync\condition.di : core\sync\condition.d | |
199 $(DMD) -c -d -o- -Hf$@ $** | |
200 | |
201 $(IMPDIR)\core\sync\config.di : core\sync\config.d | |
202 $(DMD) -c -d -o- -Hf$@ $** | |
203 | |
204 $(IMPDIR)\core\sync\exception.di : core\sync\exception.d | |
205 $(DMD) -c -d -o- -Hf$@ $** | |
206 | |
207 $(IMPDIR)\core\sync\mutex.di : core\sync\mutex.d | |
208 $(DMD) -c -d -o- -Hf$@ $** | |
209 | |
210 $(IMPDIR)\core\sync\rwmutex.di : core\sync\rwmutex.d | |
211 $(DMD) -c -d -o- -Hf$@ $** | |
212 | |
213 $(IMPDIR)\core\sync\semaphore.di : core\sync\semaphore.d | |
214 $(DMD) -c -d -o- -Hf$@ $** | |
215 | |
216 # Rulez | |
217 | |
218 all : $(BUILDS) doc | |
219 | |
220 debug : $(LIBDIR)\debug\$(LIBBASENAME) $(IMPORTS) | |
221 release : $(LIBDIR)\release\$(LIBBASENAME) $(IMPORTS) | |
222 unittest : $(LIBDIR)\unittest\$(LIBBASENAME) $(IMPORTS) | |
223 doc : $(DOCS) | |
224 | |
225 clean : | |
226 del $(IMPORTS) $(DOCS) $(ALLLIBS) |