29
|
1 CC = ${CBC_COMPILER}
|
|
2 LD = ${CBC_COMPILER}
|
|
3 AR = ar
|
|
4 MAKE = make
|
|
5 PERL = /usr/bin/perl
|
|
6 RM = rm -f
|
|
7 CAT = cat
|
|
8 SHELL = /bin/sh
|
|
9 CP = $(PERL) -MExtUtils::Command -e cp
|
|
10 MKPATH = $(PERL) -MExtUtils::Command -e mkpath
|
|
11 CHMOD = $(PERL) -MExtUtils::Command -e chmod
|
|
12 RM_RF = $(PERL) -MExtUtils::Command -e rm_rf
|
|
13 RM_F = $(PERL) -MExtUtils::Command -e rm_f
|
|
14
|
|
15 MINGW_UNICODE =
|
|
16
|
|
17
|
|
18 BUILD_PATH= /mnt/dalmore-home/one/src/build_perl6/MoarVM
|
|
19 CONFIG = --cc ${CC} --debug --no-optimize --compiler gcc --prefix=${BUILD_PATH}
|
|
20 ADDCONFIG =
|
|
21
|
|
22 TRACING = 0
|
|
23 CGOTO = 1
|
|
24 RDTSCP = 1
|
|
25 NOISY = 0
|
|
26
|
|
27 MSG = @:
|
|
28 CMD =
|
|
29 NOOUT =
|
|
30 NOERR =
|
|
31
|
|
32 ifneq ($(NOISY), 1)
|
|
33 MSG = @echo
|
|
34 CMD = @
|
|
35 NOOUT = > /dev/null
|
|
36 NOERR = 2> /dev/null
|
|
37 endif
|
|
38
|
|
39
|
|
40 PREFIX = ${BUILD_PATH}
|
|
41 BINDIR = ${BUILD_PATH}/bin
|
|
42 LIBDIR = ${BUILD_PATH}/lib
|
|
43 MASTDIR = ${BUILD_PATH}/share/nqp/lib/MAST
|
|
44
|
|
45 PKGCONFIGDIR = ${BUILD_PATH}/share/pkgconfig
|
|
46
|
|
47 CFLAGS = -O0 -Werror=declaration-after-statement -Werror=pointer-arith -g3 -D_REENTRANT -D_FILE_OFFSET_BITS=64 -fPIC -DDEBUG_HELPERS -DMVM_TRACING=$(TRACING) -DMVM_CGOTO=$(CGOTO) -DMVM_RDTSCP=$(RDTSCP)
|
|
48 CINCLUDES = -I3rdparty/libuv/include -I3rdparty/libuv/src -I3rdparty/libatomicops/src -I3rdparty/libtommath -I3rdparty/dyncall/dynload -I3rdparty/dyncall/dyncall -I3rdparty/dyncall/dyncallback \
|
|
49 -I3rdparty/sha1 \
|
|
50 -I3rdparty/tinymt \
|
|
51 -I3rdparty/dynasm \
|
|
52 -I3rdparty/cmp \
|
|
53 -I3rdparty \
|
|
54 -Isrc
|
|
55 LDFLAGS = -g3 -Wl,-rpath,"//${LIBDIR}"
|
|
56 LDLIBS = -lm -lpthread -lrt -ldl
|
|
57 MAIN_LIBS = -L. -lmoar
|
|
58 DLL_LIBS = 3rdparty/cmp/libcmp.a 3rdparty/dyncall/dyncall/libdyncall_s.a 3rdparty/dyncall/dyncallback/libdyncallback_s.a 3rdparty/dyncall/dynload/libdynload_s.a 3rdparty/libatomicops/src/libatomic_ops.a 3rdparty/tinymt/libtinymt.a 3rdparty/sha1/libsha1.a 3rdparty/libtommath/libtommath.a 3rdparty/libuv/libuv.a $(LDLIBS)
|
|
59 ARFLAGS = rcs
|
|
60
|
|
61 PLATFORM_WIN32 = src/platform/win32/mmap.o \
|
|
62 src/platform/win32/time.o \
|
|
63 src/platform/win32/io.o
|
|
64
|
|
65 PLATFORM_POSIX = src/platform/posix/mmap.o \
|
|
66 src/platform/posix/time.o \
|
|
67 src/platform/posix/io.o
|
|
68
|
|
69 DASM_FLAGS = -D POSIX=1
|
|
70 JIT_ARCH_X64 = src/jit/x64/emit.o src/jit/x64/arch.o
|
|
71 JIT_STUB = src/jit/stub.o
|
|
72 JIT_OBJECTS = src/jit/graph.o \
|
|
73 src/jit/label.o \
|
|
74 src/jit/compile.o \
|
|
75 src/jit/log.o \
|
|
76 src/jit/expr.o \
|
|
77 src/jit/tile.o \
|
|
78 src/jit/linear_scan.o
|
|
79
|
|
80 # JIT intermediate files which clean should remove
|
|
81 JIT_INTERMEDIATES = src/jit/x64/emit.c \
|
|
82 src/jit/x64/tile_pattern.h \
|
|
83 src/jit/core_templates.h
|
|
84
|
|
85 MAIN_OBJECTS = src/main.o
|
|
86
|
|
87
|
|
88 OBJECTS = src/core/callsite.o \
|
|
89 src/core/args.o \
|
|
90 src/core/exceptions.o \
|
|
91 src/core/cbc-interp.o \
|
|
92 src/core/threadcontext.o \
|
|
93 src/core/compunit.o \
|
|
94 src/core/bytecode.o \
|
|
95 src/core/frame.o \
|
|
96 src/core/callstack.o \
|
|
97 src/core/validation.o \
|
|
98 src/core/bytecodedump.o \
|
|
99 src/core/threads.o \
|
|
100 src/core/ops.o \
|
|
101 src/core/hll.o \
|
|
102 src/core/loadbytecode.o \
|
|
103 src/math/num.o \
|
|
104 src/math/grisu.o \
|
|
105 src/core/coerce.o \
|
|
106 src/core/dll.o \
|
|
107 src/core/ext.o \
|
|
108 src/core/nativecall.o \
|
|
109 src/core/nativecall_dyncall.o \
|
|
110 src/core/continuation.o \
|
|
111 src/core/intcache.o \
|
|
112 src/core/fixedsizealloc.o \
|
|
113 src/core/regionalloc.o \
|
|
114 src/debug/debugserver.o \
|
|
115 src/gen/config.o \
|
|
116 src/gc/orchestrate.o \
|
|
117 src/gc/allocation.o \
|
|
118 src/gc/worklist.o \
|
|
119 src/gc/roots.o \
|
|
120 src/gc/collect.o \
|
|
121 src/gc/gen2.o \
|
|
122 src/gc/wb.o \
|
|
123 src/gc/objectid.o \
|
|
124 src/gc/finalize.o \
|
|
125 src/gc/debug.o \
|
|
126 src/io/io.o \
|
|
127 src/io/eventloop.o \
|
|
128 src/io/syncfile.o \
|
|
129 src/io/syncsocket.o \
|
|
130 src/io/fileops.o \
|
|
131 src/io/dirops.o \
|
|
132 src/io/procops.o \
|
|
133 src/io/timers.o \
|
|
134 src/io/filewatchers.o \
|
|
135 src/io/signals.o \
|
|
136 src/io/asyncsocket.o \
|
|
137 src/io/asyncsocketudp.o \
|
|
138 src/6model/reprs.o \
|
|
139 src/6model/reprconv.o \
|
|
140 src/6model/containers.o \
|
|
141 src/6model/parametric.o \
|
|
142 src/6model/reprs/MVMString.o \
|
|
143 src/6model/reprs/VMArray.o \
|
|
144 src/6model/reprs/MVMHash.o \
|
|
145 src/6model/reprs/MVMCFunction.o \
|
|
146 src/6model/reprs/KnowHOWREPR.o \
|
|
147 src/6model/reprs/KnowHOWAttributeREPR.o \
|
|
148 src/6model/reprs/P6str.o \
|
|
149 src/6model/reprs/P6opaque.o \
|
|
150 src/6model/reprs/MVMCode.o \
|
|
151 src/6model/reprs/MVMOSHandle.o \
|
|
152 src/6model/reprs/MVMCompUnit.o \
|
|
153 src/6model/reprs/MVMStaticFrame.o \
|
|
154 src/6model/reprs/P6int.o \
|
|
155 src/6model/reprs/P6num.o \
|
|
156 src/6model/reprs/Uninstantiable.o \
|
|
157 src/6model/reprs/HashAttrStore.o \
|
|
158 src/6model/reprs/MVMThread.o \
|
|
159 src/6model/reprs/MVMIter.o \
|
|
160 src/6model/reprs/MVMContext.o \
|
|
161 src/6model/reprs/SCRef.o \
|
|
162 src/6model/reprs/MVMCallCapture.o \
|
|
163 src/6model/reprs/P6bigint.o \
|
|
164 src/6model/reprs/NFA.o \
|
|
165 src/6model/reprs/MVMException.o \
|
|
166 src/6model/reprs/MVMDLLSym.o \
|
|
167 src/6model/reprs/MVMMultiCache.o \
|
|
168 src/6model/reprs/MVMContinuation.o \
|
|
169 src/6model/reprs/NativeCall.o \
|
|
170 src/6model/reprs/CPointer.o \
|
|
171 src/6model/reprs/CStr.o \
|
|
172 src/6model/reprs/CArray.o \
|
|
173 src/6model/reprs/CStruct.o \
|
|
174 src/6model/reprs/CUnion.o \
|
|
175 src/6model/reprs/ReentrantMutex.o \
|
|
176 src/6model/reprs/ConditionVariable.o \
|
|
177 src/6model/reprs/Semaphore.o \
|
|
178 src/6model/reprs/ConcBlockingQueue.o \
|
|
179 src/6model/reprs/MVMAsyncTask.o \
|
|
180 src/6model/reprs/MVMNull.o \
|
|
181 src/6model/reprs/CPPStruct.o \
|
|
182 src/6model/reprs/NativeRef.o \
|
|
183 src/6model/reprs/MultiDimArray.o \
|
|
184 src/6model/reprs/Decoder.o \
|
|
185 src/6model/reprs/MVMSpeshLog.o \
|
|
186 src/6model/reprs/MVMStaticFrameSpesh.o \
|
|
187 src/6model/6model.o \
|
|
188 src/6model/bootstrap.o \
|
|
189 src/6model/sc.o \
|
|
190 src/6model/serialization.o \
|
|
191 src/mast/compiler.o \
|
|
192 src/mast/driver.o \
|
|
193 src/spesh/dump.o \
|
|
194 src/spesh/graph.o \
|
|
195 src/spesh/codegen.o \
|
|
196 src/spesh/candidate.o \
|
|
197 src/spesh/manipulate.o \
|
|
198 src/spesh/args.o \
|
|
199 src/spesh/facts.o \
|
|
200 src/spesh/optimize.o \
|
|
201 src/spesh/dead_bb_elimination.o \
|
|
202 src/spesh/deopt.o \
|
|
203 src/spesh/log.o \
|
|
204 src/spesh/threshold.o \
|
|
205 src/spesh/inline.o \
|
|
206 src/spesh/osr.o \
|
|
207 src/spesh/lookup.o \
|
|
208 src/spesh/iterator.o \
|
|
209 src/spesh/worker.o \
|
|
210 src/spesh/debug.o \
|
|
211 src/spesh/stats.o \
|
|
212 src/spesh/plan.o \
|
|
213 src/spesh/arg_guard.o \
|
|
214 src/strings/decode_stream.o \
|
|
215 src/strings/ascii.o \
|
|
216 src/strings/parse_num.o \
|
|
217 src/strings/utf8.o \
|
|
218 src/strings/utf8_c8.o \
|
|
219 src/strings/nfg.o \
|
|
220 src/strings/ops.o \
|
|
221 src/strings/unicode.o \
|
|
222 src/strings/normalize.o \
|
|
223 src/strings/latin1.o \
|
|
224 src/strings/utf16.o \
|
|
225 src/strings/windows1252.o \
|
|
226 src/strings/shiftjis.o \
|
|
227 src/strings/shiftjis_codeindex.o \
|
|
228 src/math/bigintops.o \
|
|
229 src/profiler/instrument.o \
|
|
230 src/profiler/log.o \
|
|
231 src/profiler/profile.o \
|
|
232 src/profiler/heapsnapshot.o \
|
|
233 src/profiler/telemeh.o \
|
|
234 src/instrument/crossthreadwrite.o \
|
|
235 src/instrument/line_coverage.o \
|
|
236 src/platform/sys.o \
|
|
237 src/platform/random.o \
|
|
238 src/moar.o \
|
|
239 $(PLATFORM_POSIX) \
|
|
240 $(JIT_OBJECTS) $(JIT_ARCH_X64)
|
|
241
|
|
242 HEADERS = src/moar.h \
|
|
243 src/types.h \
|
|
244 src/bithacks.h \
|
|
245 src/6model/6model.h \
|
|
246 src/core/instance.h \
|
|
247 src/core/threadcontext.h \
|
|
248 src/core/callsite.h \
|
|
249 src/core/args.h \
|
|
250 src/core/exceptions.h \
|
|
251 src/core/interp.h \
|
|
252 src/core/alloc.h \
|
|
253 src/core/vector.h \
|
|
254 src/core/frame.h \
|
|
255 src/core/callstack.h \
|
|
256 src/core/compunit.h \
|
|
257 src/core/bytecode.h \
|
|
258 src/core/ops.h \
|
|
259 src/core/validation.h \
|
|
260 src/core/bytecodedump.h \
|
|
261 src/core/threads.h \
|
|
262 src/core/hll.h \
|
|
263 src/core/loadbytecode.h \
|
|
264 src/core/bitmap.h \
|
|
265 src/math/num.h \
|
|
266 src/math/grisu.h \
|
|
267 src/core/coerce.h \
|
|
268 src/core/dll.h \
|
|
269 src/core/ext.h \
|
|
270 src/core/nativecall.h \
|
|
271 src/core/continuation.h \
|
|
272 src/core/intcache.h \
|
|
273 src/core/fixedsizealloc.h \
|
|
274 src/core/regionalloc.h \
|
|
275 src/debug/debugserver.h \
|
|
276 src/io/io.h \
|
|
277 src/io/eventloop.h \
|
|
278 src/io/syncfile.h \
|
|
279 src/io/syncsocket.h \
|
|
280 src/io/fileops.h \
|
|
281 src/io/dirops.h \
|
|
282 src/io/procops.h \
|
|
283 src/io/timers.h \
|
|
284 src/io/filewatchers.h \
|
|
285 src/io/signals.h \
|
|
286 src/io/asyncsocket.h \
|
|
287 src/io/asyncsocketudp.h \
|
|
288 src/gc/orchestrate.h \
|
|
289 src/gc/allocation.h \
|
|
290 src/gc/worklist.h \
|
|
291 src/gc/collect.h \
|
|
292 src/gc/roots.h \
|
|
293 src/gc/gen2.h \
|
|
294 src/gc/wb.h \
|
|
295 src/gc/objectid.h \
|
|
296 src/gc/finalize.h \
|
|
297 src/gc/debug.h \
|
|
298 src/6model/reprs.h \
|
|
299 src/6model/reprconv.h \
|
|
300 src/6model/bootstrap.h \
|
|
301 src/6model/serialization.h \
|
|
302 src/6model/containers.h \
|
|
303 src/6model/parametric.h \
|
|
304 src/6model/reprs/MVMString.h \
|
|
305 src/6model/reprs/VMArray.h \
|
|
306 src/6model/reprs/MVMHash.h \
|
|
307 src/6model/reprs/MVMCFunction.h \
|
|
308 src/6model/reprs/KnowHOWREPR.h \
|
|
309 src/6model/reprs/KnowHOWAttributeREPR.h \
|
|
310 src/6model/reprs/P6opaque.h \
|
|
311 src/6model/reprs/MVMCode.h \
|
|
312 src/6model/reprs/P6str.h \
|
|
313 src/6model/reprs/MVMOSHandle.h \
|
|
314 src/6model/reprs/P6int.h \
|
|
315 src/6model/reprs/P6num.h \
|
|
316 src/6model/reprs/Uninstantiable.h \
|
|
317 src/6model/reprs/HashAttrStore.h \
|
|
318 src/6model/reprs/MVMThread.h \
|
|
319 src/6model/reprs/MVMIter.h \
|
|
320 src/6model/reprs/MVMContext.h \
|
|
321 src/6model/reprs/SCRef.h \
|
|
322 src/6model/reprs/MVMCallCapture.h \
|
|
323 src/6model/reprs/P6bigint.h \
|
|
324 src/6model/reprs/NFA.h \
|
|
325 src/6model/reprs/MVMException.h \
|
|
326 src/6model/reprs/MVMCompUnit.h \
|
|
327 src/6model/reprs/MVMDLLSym.h \
|
|
328 src/6model/reprs/MVMMultiCache.h \
|
|
329 src/6model/reprs/MVMContinuation.h \
|
|
330 src/6model/reprs/NativeCall.h \
|
|
331 src/6model/reprs/CPointer.h \
|
|
332 src/6model/reprs/CStr.h \
|
|
333 src/6model/reprs/CArray.h \
|
|
334 src/6model/reprs/CStruct.h \
|
|
335 src/6model/reprs/CUnion.h \
|
|
336 src/6model/reprs/ReentrantMutex.h \
|
|
337 src/6model/reprs/ConditionVariable.h \
|
|
338 src/6model/reprs/Semaphore.h \
|
|
339 src/6model/reprs/ConcBlockingQueue.h \
|
|
340 src/6model/reprs/MVMAsyncTask.h \
|
|
341 src/6model/reprs/MVMNull.h \
|
|
342 src/6model/reprs/CPPStruct.h \
|
|
343 src/6model/reprs/NativeRef.h \
|
|
344 src/6model/reprs/MultiDimArray.h \
|
|
345 src/6model/reprs/Decoder.h \
|
|
346 src/6model/reprs/MVMSpeshLog.h \
|
|
347 src/6model/reprs/MVMStaticFrameSpesh.h \
|
|
348 src/6model/sc.h \
|
|
349 src/mast/compiler.h \
|
|
350 src/mast/driver.h \
|
|
351 src/mast/nodes.h \
|
|
352 src/spesh/dump.h \
|
|
353 src/spesh/debug.h \
|
|
354 src/spesh/graph.h \
|
|
355 src/spesh/codegen.h \
|
|
356 src/spesh/candidate.h \
|
|
357 src/spesh/manipulate.h \
|
|
358 src/spesh/args.h \
|
|
359 src/spesh/facts.h \
|
|
360 src/spesh/optimize.h \
|
|
361 src/spesh/dead_bb_elimination.h \
|
|
362 src/spesh/deopt.h \
|
|
363 src/spesh/log.h \
|
|
364 src/spesh/threshold.h \
|
|
365 src/spesh/inline.h \
|
|
366 src/spesh/osr.h \
|
|
367 src/spesh/lookup.h \
|
|
368 src/spesh/iterator.h \
|
|
369 src/spesh/worker.h \
|
|
370 src/spesh/stats.h \
|
|
371 src/spesh/plan.h \
|
|
372 src/spesh/arg_guard.h \
|
|
373 src/strings/unicode_gen.h \
|
|
374 src/strings/normalize.h \
|
|
375 src/strings/decode_stream.h \
|
|
376 src/strings/ascii.h \
|
|
377 src/strings/parse_num.h \
|
|
378 src/strings/utf8.h \
|
|
379 src/strings/utf8_c8.h \
|
|
380 src/strings/iter.h \
|
|
381 src/strings/nfg.h \
|
|
382 src/strings/ops.h \
|
|
383 src/strings/unicode.h \
|
|
384 src/strings/latin1.h \
|
|
385 src/strings/utf16.h \
|
|
386 src/strings/windows1252.h \
|
|
387 src/strings/shiftjis_codeindex.h \
|
|
388 src/math/bigintops.h \
|
|
389 src/profiler/instrument.h \
|
|
390 src/profiler/log.h \
|
|
391 src/profiler/profile.h \
|
|
392 src/profiler/heapsnapshot.h \
|
|
393 src/profiler/telemeh.h \
|
|
394 src/platform/mmap.h \
|
|
395 src/platform/time.h \
|
|
396 src/platform/threads.h \
|
|
397 src/platform/io.h \
|
|
398 src/platform/sys.h \
|
|
399 src/platform/setjmp.h \
|
|
400 src/platform/memmem.h \
|
|
401 src/platform/random.h \
|
|
402 src/jit/graph.h \
|
|
403 src/jit/label.h \
|
|
404 src/jit/expr.h \
|
|
405 src/jit/expr_ops.h \
|
|
406 src/jit/compile.h \
|
|
407 src/jit/tile.h \
|
|
408 src/jit/register.h \
|
|
409 src/jit/log.h \
|
|
410 src/instrument/crossthreadwrite.h \
|
|
411 src/instrument/line_coverage.h \
|
|
412 src/gen/config.h \
|
|
413 src/debug/debugserver.h \
|
|
414 3rdparty/uthash.h \
|
|
415 3rdparty/cmp/cmp.h \
|
|
416 src/core/oplables-cbc-codes.h
|
|
417
|
|
418 UV_UNIX = 3rdparty/libuv/src/fs-poll.o \
|
|
419 3rdparty/libuv/src/inet.o \
|
|
420 3rdparty/libuv/src/uv-common.o \
|
|
421 3rdparty/libuv/src/version.o \
|
|
422 3rdparty/libuv/src/unix/async.o \
|
|
423 3rdparty/libuv/src/unix/core.o \
|
|
424 3rdparty/libuv/src/unix/dl.o \
|
|
425 3rdparty/libuv/src/unix/fs.o \
|
|
426 3rdparty/libuv/src/unix/getaddrinfo.o \
|
|
427 3rdparty/libuv/src/unix/loop-watcher.o \
|
|
428 3rdparty/libuv/src/unix/loop.o \
|
|
429 3rdparty/libuv/src/unix/pipe.o \
|
|
430 3rdparty/libuv/src/unix/poll.o \
|
|
431 3rdparty/libuv/src/unix/process.o \
|
|
432 3rdparty/libuv/src/unix/signal.o \
|
|
433 3rdparty/libuv/src/unix/stream.o \
|
|
434 3rdparty/libuv/src/unix/tcp.o \
|
|
435 3rdparty/libuv/src/unix/thread.o \
|
|
436 3rdparty/libuv/src/threadpool.o \
|
|
437 3rdparty/libuv/src/unix/timer.o \
|
|
438 3rdparty/libuv/src/unix/tty.o \
|
|
439 3rdparty/libuv/src/unix/udp.o
|
|
440
|
|
441 UV_LINUX = 3rdparty/libuv/src/unix/linux-core.o \
|
|
442 3rdparty/libuv/src/unix/linux-inotify.o \
|
|
443 3rdparty/libuv/src/unix/linux-syscalls.o \
|
|
444 3rdparty/libuv/src/unix/proctitle.o \
|
|
445 $(UV_UNIX)
|
|
446
|
|
447 UV_OPENBSD = 3rdparty/libuv/src/unix/openbsd.o \
|
|
448 3rdparty/libuv/src/unix/kqueue.o \
|
|
449 3rdparty/libuv/src/unix/posix-hrtime.o \
|
|
450 $(UV_UNIX)
|
|
451
|
|
452 UV_NETBSD = 3rdparty/libuv/src/unix/netbsd.o \
|
|
453 3rdparty/libuv/src/unix/kqueue.o \
|
|
454 3rdparty/libuv/src/unix/posix-hrtime.o \
|
|
455 $(UV_UNIX)
|
|
456
|
|
457 UV_FREEBSD = 3rdparty/libuv/src/unix/freebsd.o \
|
|
458 3rdparty/libuv/src/unix/kqueue.o \
|
|
459 3rdparty/libuv/src/unix/posix-hrtime.o \
|
|
460 $(UV_UNIX)
|
|
461
|
|
462 UV_DARWIN = 3rdparty/libuv/src/unix/darwin.o \
|
|
463 3rdparty/libuv/src/unix/darwin-proctitle.o \
|
|
464 3rdparty/libuv/src/unix/fsevents.o \
|
|
465 3rdparty/libuv/src/unix/kqueue.o \
|
|
466 3rdparty/libuv/src/unix/proctitle.o \
|
|
467 $(UV_UNIX)
|
|
468
|
|
469 UV_SOLARIS = 3rdparty/libuv/src/unix/sunos.o \
|
|
470 $(UV_UNIX)
|
|
471
|
|
472 UV_AIX = 3rdparty/libuv/src/unix/aix.o \
|
|
473 $(UV_UNIX)
|
|
474
|
|
475 UV_OBJECTS = $(UV_LINUX)
|
|
476
|
|
477 TOM_OBJECTS = 3rdparty/libtommath/bn_error.o 3rdparty/libtommath/bn_fast_mp_invmod.o 3rdparty/libtommath/bn_fast_mp_montgomery_reduce.o 3rdparty/libtommath/bn_fast_s_mp_mul_digs.o 3rdparty/libtommath/bn_fast_s_mp_mul_high_digs.o 3rdparty/libtommath/bn_fast_s_mp_sqr.o 3rdparty/libtommath/bn_mp_2expt.o 3rdparty/libtommath/bn_mp_abs.o 3rdparty/libtommath/bn_mp_add.o 3rdparty/libtommath/bn_mp_add_d.o 3rdparty/libtommath/bn_mp_addmod.o 3rdparty/libtommath/bn_mp_and.o 3rdparty/libtommath/bn_mp_clamp.o 3rdparty/libtommath/bn_mp_clear.o 3rdparty/libtommath/bn_mp_clear_multi.o 3rdparty/libtommath/bn_mp_cmp.o 3rdparty/libtommath/bn_mp_cmp_d.o 3rdparty/libtommath/bn_mp_cmp_mag.o 3rdparty/libtommath/bn_mp_cnt_lsb.o 3rdparty/libtommath/bn_mp_copy.o 3rdparty/libtommath/bn_mp_count_bits.o 3rdparty/libtommath/bn_mp_div.o 3rdparty/libtommath/bn_mp_div_2.o 3rdparty/libtommath/bn_mp_div_2d.o 3rdparty/libtommath/bn_mp_div_3.o 3rdparty/libtommath/bn_mp_div_d.o 3rdparty/libtommath/bn_mp_dr_is_modulus.o 3rdparty/libtommath/bn_mp_dr_reduce.o 3rdparty/libtommath/bn_mp_dr_setup.o 3rdparty/libtommath/bn_mp_exch.o 3rdparty/libtommath/bn_mp_export.o 3rdparty/libtommath/bn_mp_expt_d.o 3rdparty/libtommath/bn_mp_expt_d_ex.o 3rdparty/libtommath/bn_mp_exptmod.o 3rdparty/libtommath/bn_mp_exptmod_fast.o 3rdparty/libtommath/bn_mp_exteuclid.o 3rdparty/libtommath/bn_mp_fread.o 3rdparty/libtommath/bn_mp_fwrite.o 3rdparty/libtommath/bn_mp_gcd.o 3rdparty/libtommath/bn_mp_get_int.o 3rdparty/libtommath/bn_mp_get_long.o 3rdparty/libtommath/bn_mp_get_long_long.o 3rdparty/libtommath/bn_mp_grow.o 3rdparty/libtommath/bn_mp_import.o 3rdparty/libtommath/bn_mp_init.o 3rdparty/libtommath/bn_mp_init_copy.o 3rdparty/libtommath/bn_mp_init_multi.o 3rdparty/libtommath/bn_mp_init_set.o 3rdparty/libtommath/bn_mp_init_set_int.o 3rdparty/libtommath/bn_mp_init_size.o 3rdparty/libtommath/bn_mp_invmod.o 3rdparty/libtommath/bn_mp_invmod_slow.o 3rdparty/libtommath/bn_mp_is_square.o 3rdparty/libtommath/bn_mp_jacobi.o 3rdparty/libtommath/bn_mp_karatsuba_mul.o 3rdparty/libtommath/bn_mp_karatsuba_sqr.o 3rdparty/libtommath/bn_mp_lcm.o 3rdparty/libtommath/bn_mp_lshd.o 3rdparty/libtommath/bn_mp_mod.o 3rdparty/libtommath/bn_mp_mod_2d.o 3rdparty/libtommath/bn_mp_mod_d.o 3rdparty/libtommath/bn_mp_montgomery_calc_normalization.o 3rdparty/libtommath/bn_mp_montgomery_reduce.o 3rdparty/libtommath/bn_mp_montgomery_setup.o 3rdparty/libtommath/bn_mp_mul.o 3rdparty/libtommath/bn_mp_mul_2.o 3rdparty/libtommath/bn_mp_mul_2d.o 3rdparty/libtommath/bn_mp_mul_d.o 3rdparty/libtommath/bn_mp_mulmod.o 3rdparty/libtommath/bn_mp_n_root.o 3rdparty/libtommath/bn_mp_n_root_ex.o 3rdparty/libtommath/bn_mp_neg.o 3rdparty/libtommath/bn_mp_or.o 3rdparty/libtommath/bn_mp_prime_fermat.o 3rdparty/libtommath/bn_mp_prime_is_divisible.o 3rdparty/libtommath/bn_mp_prime_is_prime.o 3rdparty/libtommath/bn_mp_prime_miller_rabin.o 3rdparty/libtommath/bn_mp_prime_next_prime.o 3rdparty/libtommath/bn_mp_prime_rabin_miller_trials.o 3rdparty/libtommath/bn_mp_prime_random_ex.o 3rdparty/libtommath/bn_mp_radix_size.o 3rdparty/libtommath/bn_mp_radix_smap.o 3rdparty/libtommath/bn_mp_rand.o 3rdparty/libtommath/bn_mp_read_radix.o 3rdparty/libtommath/bn_mp_read_signed_bin.o 3rdparty/libtommath/bn_mp_read_unsigned_bin.o 3rdparty/libtommath/bn_mp_reduce.o 3rdparty/libtommath/bn_mp_reduce_2k.o 3rdparty/libtommath/bn_mp_reduce_2k_l.o 3rdparty/libtommath/bn_mp_reduce_2k_setup.o 3rdparty/libtommath/bn_mp_reduce_2k_setup_l.o 3rdparty/libtommath/bn_mp_reduce_is_2k.o 3rdparty/libtommath/bn_mp_reduce_is_2k_l.o 3rdparty/libtommath/bn_mp_reduce_setup.o 3rdparty/libtommath/bn_mp_rshd.o 3rdparty/libtommath/bn_mp_set.o 3rdparty/libtommath/bn_mp_set_int.o 3rdparty/libtommath/bn_mp_set_long.o 3rdparty/libtommath/bn_mp_set_long_long.o 3rdparty/libtommath/bn_mp_shrink.o 3rdparty/libtommath/bn_mp_signed_bin_size.o 3rdparty/libtommath/bn_mp_sqr.o 3rdparty/libtommath/bn_mp_sqrmod.o 3rdparty/libtommath/bn_mp_sqrt.o 3rdparty/libtommath/bn_mp_sqrtmod_prime.o 3rdparty/libtommath/bn_mp_sub.o 3rdparty/libtommath/bn_mp_sub_d.o 3rdparty/libtommath/bn_mp_submod.o 3rdparty/libtommath/bn_mp_to_signed_bin.o 3rdparty/libtommath/bn_mp_to_signed_bin_n.o 3rdparty/libtommath/bn_mp_to_unsigned_bin.o 3rdparty/libtommath/bn_mp_to_unsigned_bin_n.o 3rdparty/libtommath/bn_mp_toom_mul.o 3rdparty/libtommath/bn_mp_toom_sqr.o 3rdparty/libtommath/bn_mp_toradix.o 3rdparty/libtommath/bn_mp_toradix_n.o 3rdparty/libtommath/bn_mp_unsigned_bin_size.o 3rdparty/libtommath/bn_mp_xor.o 3rdparty/libtommath/bn_mp_zero.o 3rdparty/libtommath/bn_prime_tab.o 3rdparty/libtommath/bn_reverse.o 3rdparty/libtommath/bn_s_mp_add.o 3rdparty/libtommath/bn_s_mp_exptmod.o 3rdparty/libtommath/bn_s_mp_mul_digs.o 3rdparty/libtommath/bn_s_mp_mul_high_digs.o 3rdparty/libtommath/bn_s_mp_sqr.o 3rdparty/libtommath/bn_s_mp_sub.o 3rdparty/libtommath/bncore.o
|
|
478
|
|
479 THIRDPARTY = 3rdparty/cmp/libcmp.a 3rdparty/dyncall/dyncall/libdyncall_s.a 3rdparty/dyncall/dyncallback/libdyncallback_s.a 3rdparty/dyncall/dynload/libdynload_s.a 3rdparty/libatomicops/src/libatomic_ops.a 3rdparty/tinymt/libtinymt.a 3rdparty/sha1/libsha1.a 3rdparty/libtommath/libtommath.a 3rdparty/libuv/libuv.a
|
|
480
|
|
481 MINILUA = 3rdparty/dynasm/minilua
|
|
482 DYNASM = $(MINILUA) 3rdparty/dynasm/dynasm.lua
|
|
483 DYNASM_SCRIPTS = 3rdparty/dynasm/dynasm.lua 3rdparty/dynasm/dasm_x86.lua
|
|
484 DYNASM_HEADERS = 3rdparty/dynasm/dasm_proto.h 3rdparty/dynasm/dasm_x86.h
|
|
485
|
|
486 .SUFFIXES: .c .cbc .o .i .s .dasc .expr .tile
|
|
487
|
|
488 all: moar pkgconfig/moar.pc
|
|
489
|
|
490 install: all
|
|
491 $(MKPATH) "$(DESTDIR)$(BINDIR)"
|
|
492 $(CP) moar "$(DESTDIR)$(BINDIR)"
|
|
493 $(CHMOD) 755 "$(DESTDIR)$(BINDIR)/moar"
|
|
494 $(MKPATH) "$(DESTDIR)$(LIBDIR)"
|
|
495 $(RM_F) "$(DESTDIR)$(LIBDIR)/libmoar.so"
|
|
496 $(CP) libmoar.so "$(DESTDIR)$(LIBDIR)"
|
|
497 $(MKPATH) "$(DESTDIR)$(MASTDIR)"
|
|
498 $(CP) lib/MAST/Nodes.nqp "$(DESTDIR)$(MASTDIR)"
|
|
499 $(CP) lib/MAST/Ops.nqp "$(DESTDIR)$(MASTDIR)"
|
|
500 $(MKPATH) "$(DESTDIR)$(PKGCONFIGDIR)"
|
|
501 $(CP) pkgconfig/moar.pc "$(DESTDIR)$(PKGCONFIGDIR)"
|
|
502 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar"
|
|
503 $(CP) src/gen/config.h "$(DESTDIR)$(PREFIX)/include/moar"
|
|
504 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/6model/reprs"
|
|
505 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/core"
|
|
506 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/gc"
|
|
507 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/gen"
|
|
508 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/io"
|
|
509 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/mast"
|
|
510 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/math"
|
|
511 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/platform"
|
|
512 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/profiler"
|
|
513 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/spesh"
|
|
514 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/debug"
|
|
515 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/strings"
|
|
516 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/jit"
|
|
517 $(MKPATH) "$(DESTDIR)$(PREFIX)/include/moar/instrument"
|
|
518 $(CP) 3rdparty/*.h "$(DESTDIR)$(PREFIX)/include/moar"
|
|
519 $(CP) src/*.h "$(DESTDIR)$(PREFIX)/include/moar"
|
|
520 $(CP) src/6model/*.h "$(DESTDIR)$(PREFIX)/include/moar/6model"
|
|
521 $(CP) src/6model/reprs/*.h "$(DESTDIR)$(PREFIX)/include/moar/6model/reprs"
|
|
522 $(CP) src/core/*.h "$(DESTDIR)$(PREFIX)/include/moar/core"
|
|
523 $(CP) src/gc/*.h "$(DESTDIR)$(PREFIX)/include/moar/gc"
|
|
524 $(CP) src/gen/*.h "$(DESTDIR)$(PREFIX)/include/moar/gen"
|
|
525 $(CP) src/io/*.h "$(DESTDIR)$(PREFIX)/include/moar/io"
|
|
526 $(CP) src/mast/*.h "$(DESTDIR)$(PREFIX)/include/moar/mast"
|
|
527 $(CP) src/math/*.h "$(DESTDIR)$(PREFIX)/include/moar/math"
|
|
528 $(CP) src/platform/*.h "$(DESTDIR)$(PREFIX)/include/moar/platform"
|
|
529 $(CP) src/profiler/*.h "$(DESTDIR)$(PREFIX)/include/moar/profiler"
|
|
530 $(CP) src/spesh/*.h "$(DESTDIR)$(PREFIX)/include/moar/spesh"
|
|
531 $(CP) src/debug/*.h "$(DESTDIR)$(PREFIX)/include/moar/debug"
|
|
532 $(CP) src/strings/*.h "$(DESTDIR)$(PREFIX)/include/moar/strings"
|
|
533 $(CP) src/jit/*.h "$(DESTDIR)$(PREFIX)/include/moar/jit"
|
|
534 $(CP) src/instrument/*.h "$(DESTDIR)$(PREFIX)/include/moar/instrument"
|
|
535 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libuv
|
|
536 $(CP) 3rdparty/libuv/include/*.h $(DESTDIR)$(PREFIX)/include/libuv
|
|
537 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/armcc
|
|
538 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/gcc
|
|
539 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/hpc
|
|
540 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/ibmc
|
|
541 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/icc
|
|
542 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/loadstore
|
|
543 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/msftc
|
|
544 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/sunc
|
|
545 $(CP) 3rdparty/libatomicops/src/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops
|
|
546 $(CP) 3rdparty/libatomicops/src/atomic_ops/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops
|
|
547 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps
|
|
548 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/armcc/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/armcc
|
|
549 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/gcc/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/gcc
|
|
550 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/hpc/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/hpc
|
|
551 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/ibmc/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/ibmc
|
|
552 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/icc/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/icc
|
|
553 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/loadstore/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/loadstore
|
|
554 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/msftc/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/msftc
|
|
555 $(CP) 3rdparty/libatomicops/src/atomic_ops/sysdeps/sunc/*.h $(DESTDIR)$(PREFIX)/include/libatomic_ops/atomic_ops/sysdeps/sunc
|
|
556 $(MKPATH) $(DESTDIR)$(PREFIX)/include/libtommath
|
|
557 $(CP) 3rdparty/libtommath/*.h $(DESTDIR)$(PREFIX)/include/libtommath
|
|
558 $(MKPATH) $(DESTDIR)$(PREFIX)/include/dyncall
|
|
559 $(CP) 3rdparty/dyncall/dynload/*.h $(DESTDIR)$(PREFIX)/include/dyncall
|
|
560 $(CP) 3rdparty/dyncall/dyncall/*.h $(DESTDIR)$(PREFIX)/include/dyncall
|
|
561 $(CP) 3rdparty/dyncall/dyncallback/*.h $(DESTDIR)$(PREFIX)/include/dyncall
|
|
562
|
|
563
|
|
564 lib: libmoar.so
|
|
565
|
|
566 help:
|
|
567 @$(CAT) build/help.txt
|
|
568
|
|
569 test:
|
|
570 @$(CAT) build/test.txt
|
|
571
|
|
572 reconfig: realclean
|
|
573 $(MSG) reconfiguring with [ $(CONFIG) $(ADDCONFIG) ]
|
|
574 $(CMD)$(PERL) Configure.pl $(CONFIG) $(ADDCONFIG)
|
|
575
|
|
576 clangcheck gcccheck:
|
|
577 @$(MAKE) --no-print-directory -f tools/check.mk $@
|
|
578
|
|
579 moar: $(MAIN_OBJECTS) libmoar.so
|
|
580 $(MSG) linking $@
|
|
581 $(CMD)$(LD) -o $@ $(LDFLAGS) $(MINGW_UNICODE) $(MAIN_OBJECTS) $(MAIN_LIBS)
|
|
582
|
|
583 libmoar.a: $(OBJECTS) $(THIRDPARTY)
|
|
584 $(MSG) linking $@
|
|
585 $(CMD)$(AR) $(ARFLAGS) $@ $(OBJECTS) $(NOOUT)
|
|
586
|
|
587 libmoar.so: $(OBJECTS) $(THIRDPARTY)
|
|
588 $(MSG) linking $@
|
|
589 $(CMD)$(LD) -o $@ $(LDFLAGS) -shared -fPIC $(OBJECTS) $(DLL_LIBS)
|
|
590
|
|
591 libuv: 3rdparty/libuv/libuv.a
|
|
592
|
|
593 $(MAIN_OBJECTS) $(OBJECTS): $(HEADERS)
|
|
594
|
|
595 tracing:
|
|
596 $(MSG) enable tracing dispatch
|
|
597 -$(CMD)$(RM) src/main.o src/core/cbc-interp.o
|
|
598 $(CMD)$(MAKE) TRACING=1 CGOTO=0 NOISY="$(NOISY)"
|
|
599
|
|
600 cgoto:
|
|
601 $(MSG) enable computed-goto dispatch
|
|
602 -$(CMD)$(RM) src/main.o src/core/cbc-interp.o
|
|
603 $(CMD)$(MAKE) TRACING=0 CGOTO=1 NOISY="$(NOISY)"
|
|
604
|
|
605 switch no-tracing no-cgoto:
|
|
606 $(MSG) enable regular dispatch
|
|
607 -$(CMD)$(RM) src/main.o src/core/cbc-interp.o
|
|
608 $(CMD)$(MAKE) TRACING=0 CGOTO=0 NOISY="$(NOISY)"
|
|
609
|
|
610 # objflags can include -DMVM_BUILD_SHARED which affects pre-processed source
|
|
611 .c.i:
|
|
612 $(MSG) pre-processing $@
|
|
613 $(CMD)$(CC) -E $(CFLAGS) -DMVM_BUILD_SHARED -fPIC $(CINCLUDES) > $@ $*.c
|
|
614
|
|
615 .c.s:
|
|
616 $(MSG) generating assembler for $@
|
|
617 $(CMD)$(CC) -S $(CFLAGS) -DMVM_BUILD_SHARED -fPIC $(CINCLUDES) -o $@ $*.c
|
|
618
|
|
619 .c.o:
|
|
620 $(MSG) compiling $@
|
|
621 $(CMD)$(CC) -c $(CFLAGS) -DMVM_BUILD_SHARED -fPIC $(CINCLUDES) -o $@ $*.c
|
|
622
|
|
623 .cbc.i:
|
|
624 $(MSG) pre-processing $@
|
|
625 $(CMD)$(CC) -E $(CFLAGS) -DMVM_BUILD_SHARED -fPIC $(CINCLUDES) > $@ $*.c
|
|
626
|
|
627 .cbc.s:
|
|
628 $(MSG) generating assembler for $@
|
|
629 $(CMD)$(CC) -S $(CFLAGS) -DMVM_BUILD_SHARED -fPIC $(CINCLUDES) -o $@ $*.c
|
|
630
|
|
631
|
|
632 .cbc.o:
|
|
633 $(MSG) compiling $@
|
|
634 $(CMD)$(CC) -c $(CFLAGS) -DMVM_BUILD_SHARED -fPIC $(CINCLUDES) -o $@ $*.cbc
|
|
635
|
|
636
|
|
637
|
|
638 src/main.o: src/main.c
|
|
639 $(MSG) compiling $@
|
|
640 $(CMD)$(CC) -c $(CFLAGS) -DMVM_SHARED $(CINCLUDES) -o $@ $*.c
|
|
641
|
|
642 src/strings/unicode.c: src/strings/unicode_db.c src/strings/unicode_uca.c src/strings/unicode_ops.c
|
|
643 $(MSG) generating $@
|
|
644 $(CMD) $(CAT) src/strings/unicode_db.c src/strings/unicode_uca.c src/strings/unicode_ops.c > $@ $(NOERR)
|
|
645
|
|
646 $(MINILUA): 3rdparty/dynasm/minilua.c
|
|
647 $(CC) $(CFLAGS) $(LDFLAGS) 3rdparty/dynasm/minilua.c -o $@ $(LDLIBS)
|
|
648
|
|
649 .dasc.c:
|
|
650 $(MSG) preprocessing $<
|
|
651 $(CMD)$(DYNASM) $(DASM_FLAGS) -o $@ $<
|
|
652
|
|
653 .expr.h:
|
|
654 $(MSG) Precompiling templates from $<
|
|
655 $(CMD)$(PERL) -Itools/ tools/expr-template-compiler.pl -o $@ $<
|
|
656
|
|
657 .tile.h:
|
|
658 $(MSG) Building tile tables from $<
|
|
659 $(CMD)$(PERL) -Itools/ tools/tiler-table-generator.pl -o $@ $<
|
|
660
|
|
661 src/jit/x64/emit.o: src/jit/x64/emit.c $(DYNASM_HEADERS)
|
|
662
|
|
663 src/jit/x64/emit.c: src/jit/x64/emit.dasc src/jit/x64/tiles.dasc $(MINILUA) $(DYNASM_SCRIPTS)
|
|
664
|
|
665 # Expression list tables
|
|
666 src/jit/core_templates.h: src/jit/core_templates.expr src/jit/macro.expr tools/expr-template-compiler.pl src/core/oplist src/jit/expr_ops.h
|
|
667
|
|
668 # Architecture-specific tiles
|
|
669 src/jit/x64/tile_pattern.h: src/jit/x64/tile_pattern.tile tools/tiler-table-generator.pl src/jit/expr_ops.h
|
|
670
|
|
671 src/jit/expr.o: src/jit/core_templates.h
|
|
672 src/jit/tile.o: src/jit/x64/tile_pattern.h src/jit/x64/tile_decl.h
|
|
673
|
|
674 src/jit/compile.o src/jit/linear_scan.o src/jit/x64/arch.o $(JIT_OBJECTS) $(JIT_ARCH_X64): src/jit/internal.h src/jit/x64/arch.h
|
|
675
|
|
676
|
|
677
|
|
678
|
|
679 3rdparty/libuv/libuv.a: $(UV_OBJECTS)
|
|
680 $(MSG) linking $@
|
|
681 $(CMD)$(AR) $(ARFLAGS) $@ $(UV_LINUX) $(NOOUT)
|
|
682
|
|
683 3rdparty/libatomicops/src/libatomic_ops.a:
|
|
684 $(MSG) linking $@
|
|
685 $(CMD)cd 3rdparty/libatomicops && CC='$(CC)' CFLAGS='$(CFLAGS)' ./configure && cd src && $(MAKE) && cd .. $(NOOUT)
|
|
686
|
|
687 3rdparty/libtommath/libtommath.a: $(TOM_OBJECTS)
|
|
688 $(MSG) linking $@
|
|
689 $(CMD)$(AR) $(ARFLAGS) $@ 3rdparty/libtommath/*.o $(NOOUT)
|
|
690
|
|
691 3rdparty/sha1/libsha1.a: 3rdparty/sha1/sha1.o
|
|
692 $(MSG) linking $@
|
|
693 $(CMD)$(AR) $(ARFLAGS) $@ 3rdparty/sha1/*.o $(NOOUT)
|
|
694
|
|
695 3rdparty/tinymt/libtinymt.a: 3rdparty/tinymt/tinymt64.o
|
|
696 $(MSG) linking $@
|
|
697 $(CMD)$(AR) $(ARFLAGS) $@ 3rdparty/tinymt/*.o $(NOOUT)
|
|
698
|
|
699 3rdparty/cmp/libcmp.a: 3rdparty/cmp/cmp.o
|
|
700 $(MSG) linking $@
|
|
701 $(CMD)$(AR) $(ARFLAGS) $@ 3rdparty/cmp/*.o $(NOOUT)
|
|
702
|
|
703 3rdparty/dyncall/dyncall/libdyncall_s.a:
|
|
704 $(MSG) building dyncall...
|
|
705 $(CMD)cd 3rdparty/dyncall && ./configure && CC='$(CC)' CFLAGS='-fPIC' $(MAKE) -f Makefile $(NOOUT)
|
|
706 $(MSG) done.
|
|
707
|
|
708 3rdparty/dyncall/dyncallback/libdyncallback_s.a 3rdparty/dyncall/dynload/libdynload_s.a: 3rdparty/dyncall/dyncall/libdyncall_s.a
|
|
709
|
|
710 pkgconfig/moar.pc: build/mk-moar-pc.pl
|
|
711 $(PERL) build/mk-moar-pc.pl $@
|
|
712
|
|
713 clean:
|
|
714 $(MSG) remove build files
|
|
715 -$(CMD)$(RM) $(MAIN_OBJECTS) $(OBJECTS) $(JIT_INTERMEDIATES) $(NOOUT) $(NOERR)
|
|
716
|
|
717 realclean: clean
|
|
718 $(MSG) remove auxiliary files
|
|
719 -$(CMD)@: $(NOOUT) $(NOERR)
|
|
720 $(MSG) remove 3rdparty files
|
|
721 -$(CMD)$(RM) 3rdparty/libuv/libuv.a $(UV_LINUX) $(NOOUT) $(NOERR)
|
|
722 -$(CMD)cd 3rdparty/libatomicops/src && $(MAKE) distclean $(NOOUT) $(NOERR)
|
|
723 -$(CMD)$(RM) 3rdparty/libtommath/libtommath.a 3rdparty/libtommath/*.o $(NOOUT) $(NOERR)
|
|
724 -$(CMD)$(RM) 3rdparty/sha1/libsha1.a 3rdparty/sha1/*.o $(NOOUT) $(NOERR)
|
|
725 -$(CMD)$(RM) 3rdparty/tinymt/libtinymt.a 3rdparty/tinymt/*.o $(NOOUT) $(NOERR)
|
|
726 -$(CMD)cd 3rdparty/dyncall && $(MAKE) -f Makefile clean $(NOOUT) $(NOERR)
|
|
727
|
|
728 distclean: realclean
|
|
729 $(MSG) remove executable and libraries
|
|
730 -$(CMD)$(RM) moar libmoar.a libmoar.so $(NOOUT) $(NOERR)
|
|
731 $(MSG) remove configuration and generated files
|
|
732 -$(CMD)$(RM) Makefile src/gen/config.h src/gen/config.c src/strings/unicode.c \
|
|
733 tools/check.mk 3rdparty/libatomicops/config.log 3rdparty/libatomicops/config.status $(NOOUT) $(NOERR)
|
|
734 -$(CMD)$(RM_RF) build/mk-moar-pc.pl pkgconfig/ $(NOOUT) $(NOERR)
|
|
735
|
|
736 release:
|
|
737 [ -n "$(VERSION)" ] || ( echo "\nTry 'make release VERSION=yyyy.mm'\n\n"; exit 1 )
|
|
738 bash -c 'if [[ $$(git status --untracked=no --porcelain) ]]; then echo "Dirty work trees will make broken releases; maybe git stash?"; exit 1; fi'
|
|
739 ./tools/release.sh $(VERSION)
|
|
740
|
|
741
|
|
742 sandwich:
|
|
743 @echo What? Make it yourself.
|