2009-08-15 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / CMakeLists.txt
1
2 # Last synched with Makefile.am at r134597
3
4 cmake_policy(SET CMP0010 NEW)
5
6 # Helper functions
7
8 function(add_cs_target target sources args depends)
9   separate_arguments(sources)
10   separate_arguments(args)
11   separate_arguments(depends)
12   add_custom_command(
13         OUTPUT ${target}
14         COMMAND ${MCS} -out:${target} ${args} ${sources}
15         DEPENDS ${sources} ${depends}
16         )
17   add_custom_target (${target}-target DEPENDS ${target})
18 endfunction()
19
20 function(add_cs_dll target sources args depends)
21   add_cs_target(${target} ${sources} "-target:library ${args}" "${depends}")
22 endfunction()
23
24 function(add_cs_exe target sources args depends)
25   add_cs_target(${target} ${sources} "-target:exe ${args}" "${depends}")
26 endfunction()
27
28 function(add_il_target target sources args)
29   separate_arguments(sources)
30   separate_arguments(args)
31   add_custom_command(
32         OUTPUT ${target}
33         COMMAND ${ILASM} -output=${target} ${args} ${sources}
34         DEPENDS ${sources}
35         )
36   add_custom_target (${target}-target DEPENDS ${target})
37 endfunction()
38
39
40
41
42 set(count 100000)
43 set(mtest for_loop)
44 set(monodir ${top_builddir})
45
46 set(CLASS ${mcs_topdir}/class/lib/net_2_0)
47
48 set(RUNTIME MONO_PATH=${CLASS} ${top_builddir}/runtime/mono-wrapper)
49 set(RUNTIME_AOTCHECK MONO_PATH=${CLASS}:. ${top_builddir}/runtime/mono-wrapper)
50
51 set(MCS ${RUNTIME} ${CLASS}/gmcs.exe -unsafe -nowarn:0162)
52 set(ILASM ${RUNTIME} ${CLASS}/ilasm.exe)
53
54 set(x86_sources
55         mini-x86.c      
56         mini-x86.h      
57         exceptions-x86.c
58         tramp-x86.c)
59
60 set(amd64_sources
61         mini-amd64.c    
62         mini-amd64.h    
63         exceptions-amd64.c
64         tramp-amd64.c)
65
66 set(ppc_sources
67         mini-ppc.c      
68         mini-ppc.h      
69         exceptions-ppc.c
70         tramp-ppc.c)
71
72 set(arm_sources
73         mini-arm.c      
74         mini-arm.h      
75         exceptions-arm.c
76         tramp-arm.c)
77
78 set(mips_sources
79         mini-mips.c     
80         mini-mips.h     
81         exceptions-mips.c
82         tramp-mips.c)
83
84 set(sparc_sources
85         mini-sparc.c    
86         mini-sparc.h    
87         exceptions-sparc.c
88         tramp-sparc.c)
89
90 set(s390_sources
91         mini-s390.c     
92         mini-s390.h     
93         exceptions-s390.c
94         tramp-s390.c)
95
96 set(s390x_sources
97         mini-s390x.c    
98         mini-s390x.h    
99         exceptions-s390x.c
100         tramp-s390x.c)
101
102 set(ia64_sources
103         mini-ia64.c     
104         mini-ia64.h     
105         exceptions-ia64.c
106         tramp-ia64.c)
107
108 set(alpha_sources
109         mini-alpha.c    
110         mini-alpha.h    
111         exceptions-alpha.c
112         tramp-alpha.c)
113
114 set(hppa_sources
115         mini-hppa.c     
116         mini-hppa.h     
117         exceptions-hppa.c
118         tramp-hppa.c)
119
120 set(darwin_sources
121         mini-darwin.c)
122
123 set(windows_sources
124         mini-windows.c)
125
126 set(posix_sources
127         mini-posix.c)
128
129 set(common_sources
130         mini.c          
131         ir-emit.h       
132         method-to-ir.c  
133         decompose.c     
134         mini.h          
135         version.h       
136         optflags-def.h  
137         jit-icalls.h    
138         jit-icalls.c    
139         trace.c         
140         trace.h         
141         patch-info.h    
142         mini-ops.h      
143         mini-arch.h     
144         dominators.c    
145         cfold.c         
146         regalloc.c      
147         regalloc.h      
148         helpers.c       
149         liveness.c      
150         ssa.c           
151         abcremoval.c    
152         abcremoval.h    
153         ssapre.c        
154         ssapre.h        
155         local-propagation.c
156         driver.c        
157         debug-mini.c    
158         debug-mini.h    
159         linear-scan.c   
160         aot-compiler.c  
161         aot-runtime.c   
162         graph.c         
163         mini-codegen.c  
164         mini-exceptions.c
165         mini-trampolines.c  
166         declsec.c       
167         declsec.h       
168         wapihandles.c   
169         branch-opts.c   
170         mini-generic-sharing.c
171         regalloc2.c     
172         simd-methods.h  
173         tasklets.c      
174         tasklets.h      
175         simd-intrinsics.c
176         unwind.h        
177         unwind.c        
178         image-writer.h
179         image-writer.c
180         dwarfwriter.h
181         dwarfwriter.c
182         mini-gc.h       
183         mini-gc.c)
184
185 set(test_sources                
186         basic-calls.cs  
187         basic-long.cs   
188         bench.cs        
189         objects.cs      
190         arrays.cs       
191         basic-float.cs  
192         basic-math.cs   
193         basic.cs        
194         exceptions.cs   
195         devirtualization.cs
196         iltests.il.in   
197         test.cs         
198         generics.cs     
199         generics-variant-types.il
200         basic-simd.cs)
201
202 if(MONO_DEBUGGER_SUPPORTED)
203 if(AMD64)
204 set(mono_debugger_arch_sources mdb-debug-info64.s)
205 elseif(X86)
206 set(mono_debugger_arch_sources mdb-debug-info32.s)
207 endif()
208 enable_language(ASM-ATT)
209 set(mono_debugger_sources debug-debugger.c debug-debugger.h ${mono_debugger_arch_sources})
210
211 set(ASM-ATT_FLAGS)
212 else(MONO_DEBUGGER_SUPPORTED)
213 set(mono_debugger_sources)
214 endif(MONO_DEBUGGER_SUPPORTED)
215
216 set(regtests basic.exe basic-float.exe basic-long.exe basic-calls.exe objects.exe arrays.exe basic-math.exe exceptions.exe iltests.exe devirtualization.exe generics.exe basic-simd.exe)
217
218 if(X86)
219 set(arch_sources ${x86_sources} ${mono_debugger_sources})
220 set(arch_built cpu-x86.h)
221 set(arch_define __i386__)
222 endif()
223
224 if(AMD64)
225 set(arch_sources ${amd64_sources} ${mono_debugger_sources})
226 set(arch_built cpu-amd64.h)
227 set(arch_define __x86_64__)
228 endif()
229
230 if(POWERPC)
231 set(arch_sources ${ppc_sources})
232 set(arch_built cpu-ppc.h)
233 set(arch_define __ppc__)
234 endif()
235
236 if(POWERPC64)
237 set(arch_sources ${ppc_sources})
238 set(arch_built cpu-ppc64.h)
239 set(arch_define __ppc64__)
240 endif()
241
242 if(MIPS)
243 set(arch_sources ${mips_sources})
244 set(arch_built cpu-mips.h)
245 set(arch_define __mips__)
246 endif()
247
248 if(ARM)
249 # pick up arm_dpimacros.h and arm_fpamacros.h
250 set(ARCH_CFLAGS -I../arch/arm)
251 set(arch_sources ${arm_sources})
252 set(arch_built cpu-arm.h)
253 set(arch_define __arm__)
254 endif()
255
256 if(SPARC)
257 set(arch_sources ${sparc_sources})
258 set(arch_built cpu-sparc.h)
259 set(arch_define __sparc__)
260 endif()
261
262 if(SPARC64)
263 set(arch_sources ${sparc_sources})
264 set(arch_built cpu-sparc.h)
265 set(arch_define __sparc__)
266 endif()
267
268 if(S390)
269 set(arch_sources ${s390_sources})
270 set(arch_built cpu-s390.h)
271 set(arch_define __s390__)
272 endif()
273
274 if(S390x)
275 set(arch_sources ${s390x_sources})
276 set(arch_built cpu-s390x.h)
277 set(arch_define __s390__)
278 endif()
279
280 if(IA64)
281 set(arch_sources ${ia64_sources})
282 set(arch_built cpu-ia64.h)
283 set(arch_define __ia64__)
284 endif()
285
286 if(ALPHA)
287 set(arch_sources ${alpha_sources} ${mono_debugger_sources})
288 set(arch_built cpu-alpha.h)
289 set(arch_define __alpha__)
290 endif()
291
292 if(HPPA)
293 # Only support 32-bit targets for now
294 set(arch_sources ${hppa_sources})
295 set(arch_built cpu-hppa.h)
296 set(arch_define __hppa__)
297 endif()
298
299 if(PLATFORM_WIN32)
300 set(os_sources ${windows_sources})
301 endif()
302
303 if(PLATFORM_SIGPOSIX)
304 set(os_sources ${posix_sources})
305 endif()
306
307 if(PLATFORM_DARWIN)
308 set(os_sources ${darwin_sources} ${posix_sources})
309 endif()
310
311 #### we don't always use the perl impl because it's an additional
312 #### build dependency for the poor windows users
313 #### ${arch_define} is the preprocessor symbol that enables all the opcodes
314 #### for the specific platform in mini-ops.h
315 ###if CROSS_COMPILING
316 ###GENMDESC_PRG=perl ${srcdir)/genmdesc.pl ${arch_define} ${srcdir)
317 ###else !CROSS_COMPILING
318 set(GENMDESC_PRG ${CMAKE_CURRENT_BINARY_DIR}/genmdesc)
319 ###endif !CROSS_COMPILING
320
321 function(add_genmdesc_target target source define)
322   add_custom_command(
323         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}
324         COMMAND ${GENMDESC_PRG} ${CMAKE_CURRENT_BINARY_DIR}/${target} ${define} ${source}
325         DEPENDS genmdesc ${source}
326         )
327 endfunction()
328
329 foreach(arch x86 amd64 sparc ia64 alpha hppa mips)
330   add_genmdesc_target(cpu-${arch}.h cpu-${arch}.md ${arch}_desc)
331 endforeach()
332
333 add_genmdesc_target(cpu-ppc.h cpu-ppc.md ppcg4)
334 add_genmdesc_target(cpu-ppc64.h cpu-ppc64.md ppc64_cpu_desc)
335 add_genmdesc_target(cpu-arm.h cpu-arm.md arm_cpu_desc)
336 add_genmdesc_target(cpu-s390.h cpu-s390.md s390_cpu_desc)
337 add_genmdesc_target(cpu-s390x.h cpu-s390x.md s390x_cpu_desc)
338
339 include_directories(../..)
340 include_directories(${GLIB2_INCLUDE_DIRS})
341 include_directories(${LIBGC_INCLUDE_DIRS})
342 # FIXME:
343 link_directories(../../libgc/.libs)
344 set(CMAKE_C_FLAGS "${CFLAGS} ${LIBGC_CFLAGS} ${CPPFLAGS}")
345
346 # genmdesc
347 add_executable(genmdesc genmdesc.c helpers.c)
348 target_link_libraries(genmdesc monoutils-static monoruntime-static ${GLIB2_LIBRARIES})
349
350 # libmono
351
352 set(libmono_la_SOURCES ${common_sources} ${llvm_sources} ${arch_sources} ${os_sources})
353
354 # FIXME: cmake doesn't seem to recognize the ${arch_built} dependency
355 add_library(libmono-static STATIC ${libmono_la_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${arch_built})
356 target_link_libraries(libmono-static monoruntime-static monoutils-static monogc-static wapi-static ${GLIB2_LIBRARIES} ${LIBS})
357 set_target_properties(libmono-static PROPERTIES OUTPUT_NAME "mono-static")
358
359 # Since cmake has no support for convenience libraries, we have to link the
360 # final libmono.a ourselves, similarly to how libtool does it
361 add_custom_target(libmono.a
362   COMMAND rm -rf .libs/tmp libmono.a
363   COMMAND mkdir -p .libs/tmp/{1,2,3,4,5}
364   COMMAND cd .libs/tmp/1 && ar x ../../../../metadata/libmonoruntime-static.a
365   COMMAND cd .libs/tmp/2 && ar x ../../../../utils/libmonoutils-static.a
366   COMMAND cd .libs/tmp/3 && ar x ../../../../io-layer/libwapi-static.a
367   COMMAND cd .libs/tmp/3 && ar x ../../../../mini/libmono-static.a
368   COMMAND cd .libs/tmp/4 && ar x ../../../../../libgc/libmonogc-static.a
369   COMMAND ar r libmono.a `find .libs/tmp/ -name '*.o'`
370 )
371
372 # FIXME: cmake has no support for convenience libraries, so we would end up 
373 # creating a lot of shared libraries linking to each other
374 #add_library(libmono SHARED ${libmono_la_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${arch_built})
375 #set_target_properties(libmono PROPERTIES OUTPUT_NAME "mono")
376 #target_link_libraries(libmono monoruntime monoutils monogc wapi ${GLIB2_LIBRARIES} ${LIBS})
377
378 # version.h
379
380 # Its a pain to try to pass a complex shell script to add_custom_command (), so
381 # write it to disk instead
382 # " needs to be escaped as \"
383 # \ needs to be escaped as \\
384 set(top_srcdir ../../)
385 file(WRITE create-version.h.sh "
386         if test -d ${top_srcdir}/.git/svn; then svn_info=\"echo \\\"`git log --no-color --first-parent --pretty=format:%b|grep -m1 git-svn-id|sed -e 's,git-svn-id: \\(.*\\)@\\(.*\\) .*,URL: \\1 Revision: \\2,'`\"; fi;
387         if test -d ${srcdir}/.svn; then svn_info='svn info'; fi;
388         if test -n \"$svn_info\"; then
389                 (cd ${top_srcdir};
390                         LANG=C; export LANG;
391                         branch=`$svn_info | grep URL | sed -e 's,.*source/\\(.*\\)/mono.*,/\\1/mono,'`;
392                         version=`$svn_info | grep Revision | sed 's/.*: //'`;
393                         echo \"#define FULL_VERSION \\\"$branch r$version\\\"\";
394                 );
395         else
396                 echo \"#define FULL_VERSION \\\"tarball\\\"\";
397         fi > version.h
398 ")
399
400 # FIXME: dependencies ?
401 add_custom_command(
402   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
403   COMMAND chmod a+x ./create-version.h.sh
404   COMMAND ./create-version.h.sh
405   VERBATIM
406 )
407
408 # buildver.h
409
410 # We build this after libmono was built so it contains the date when the final
411 # link was done
412 add_custom_command(
413   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildver.h
414   PRE_LINK
415   COMMAND sh -c "X='\"'; echo \"const char *build_date = $X`date`$X;\" > ${CMAKE_CURRENT_BINARY_DIR}/buildver.h"
416   DEPENDS libmono-static
417   VERBATIM
418 )
419 set_source_files_properties(main.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
420 set_source_files_properties(main.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
421
422 # mono
423
424 add_executable(mono main.c ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
425 add_dependencies(mono libmono-static)
426 target_link_libraries(mono libmono-static ${GLIB2_LIBRARIES})
427
428 install(
429   TARGETS mono
430   RUNTIME DESTINATION bin)
431
432 # FIXME: Can't specify a dependency on libmono.a, and we don't want to build
433 # libmono.a until needed
434 install(
435   FILES libmono.a DESTINATION lib)
436
437 # Test file targets
438
439 foreach(test ${test_sources})
440   if (${test} MATCHES ".*\\.cs")
441         string(REPLACE ".cs" ".exe" exe_name ${test})
442         add_cs_exe(${exe_name} ${test} "-r:TestDriver.dll -r:generics-variant-types.dll -r:Mono.Simd.dll" "TestDriver.dll generics-variant-types.dll")
443   endif()
444 endforeach()
445
446 set(il_source "iltests.il")
447 set(exe_name "iltests.exe")
448 add_custom_command(
449   OUTPUT ${exe_name}
450   COMMAND ${ILASM} -output=${exe_name} ${il_source}
451   DEPENDS ${il_source}
452   )
453 add_custom_target(${exe_name}-exe DEPENDS ${exe_name})
454
455 add_custom_command(
456   OUTPUT "iltests.il"
457   COMMAND echo // DO NOT EDIT: This file has been generated from iltests.il.in > iltests.il
458   COMMAND cpp -Darch=${arch_define} < iltests.il.in | sed "s/^#.*//" >> iltests.il
459   DEPENDS iltests.il.in
460   VERBATIM
461 )
462
463 add_cs_dll("TestDriver.dll" "TestDriver.cs" "-r:System.dll -r:System.dll" "")
464
465 add_il_target("generics-variant-types.dll" "generics-variant-types.il" "-dll")
466   
467 # Testing targets
468
469 add_custom_target(rcheck
470   COMMAND ${RUNTIME} --regression ${regtests}
471   DEPENDS mono ${regtests}
472 )
473
474 # FIXME: make runs rcheck, but then says: 'No rule to make target `rcheck', needed by `mono/mini/CMakeFiles/check'
475 #add_custom_target(check
476 #  DEPENDS rcheck)
477 add_custom_target(check
478   COMMAND ${RUNTIME} --regression ${regtests}
479   DEPENDS mono ${regtests}
480 )
481
482 add_custom_target(testi
483   COMMAND ${RUNTIME} -v -v --ncompile 1 --compile Test:${mtest} test.exe
484   DEPENDS mono test.exe
485 )
486
487 # ensure the tests are actually correct
488 add_custom_target(checktests
489   COMMAND for i in ${regtests}\; do ${RUNTIME} $$i\; done
490   DEPENDS ${regtests}
491 )
492
493 add_custom_target(aotcheck
494   COMMAND rm -f *.exe.so
495   COMMAND ${RUNTIME} --aot ${regtests} || exit 1
496   COMMAND for i in ${regtests}\; do ${RUNTIME_AOTCHECK} --regression $$i || exit 1\; done
497   COMMAND rm -f *.exe.so
498   DEPENDS mono ${regtests}
499 )
500
501 # This currently only works on amd64/arm
502 add_custom_target(fullaotcheck
503   COMMAND       rm -rf fullaot-tmp
504   COMMAND       mkdir fullaot-tmp
505   COMMAND       cp ${CLASS}/mscorlib.dll ${CLASS}/Mono.Simd.dll ${regtests} generics-variant-types.dll TestDriver.dll fullaot-tmp/
506   COMMAND       cp ${regtests} fullaot-tmp/
507   COMMAND       MONO_PATH=fullaot-tmp ${top_builddir}/runtime/mono-wrapper --aot=full fullaot-tmp/* || exit 1
508   COMMAND   for i in ${regtests}\; do echo $$i\; MONO_PATH=fullaot-tmp ${top_builddir}/runtime/mono-wrapper --full-aot fullaot-tmp/$$i --exclude '!FULLAOT' || exit 1\; done
509   DEPENDS mono ${regtests}
510 )
511
512 add_custom_target(bench
513   COMMAND time env ${RUNTIME} --ncompile ${count} --compile Test:${mtest} test.exe
514   DEPENDS mono test.exe
515 )
516
517 add_custom_target(stat1
518   COMMAND ${RUNTIME} --verbose --statfile stats.pl --regression bench.exe
519   COMMAND perl viewstat.pl stats.pl
520   DEPENDS mono bench.exe
521 )
522
523 add_custom_target(stat2
524   COMMAND ${RUNTIME} --verbose --statfile stats.pl --regression basic.exe
525   COMMAND perl viewstat.pl -e stats.pl
526   DEPENDS mono basic.exe
527 )
528
529 add_custom_target(stat3
530   COMMAND ${RUNTIME} --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe 
531   COMMAND perl viewstat.pl stats.pl
532   DEPENDS mono bench.exe
533 )
534
535 #### This is needed for automake dependency generation
536 ###if INCLUDED_LIBGC
537 ###libgc_libs=${monodir)/libgc/libmonogc.la
538 ###libgc_static_libs=${monodir)/libgc/libmonogc-static.la
539 ###else
540 ###libgc_libs=${LIBGC_LIBS)
541 ###libgc_static_libs=${LIBGC_STATIC_LIBS)
542 ###endif
543
544 ###AM_CFLAGS = \
545 ###     -I${top_srcdir}         \
546 ###     ${LIBGC_CFLAGS)         \
547 ###     ${GLIB_CFLAGS)
548 ###     ${PLATFORM_CFLAGS} ${ARCH_CFLAGS)
549
550 ###AM_CXXFLAGS = ${LLVM_CXXFLAGS} ${GLIB_CFLAGS)
551
552 ###if PLATFORM_WIN32
553 ###export HOST_CC
554 #### The mingw math.h has "extern inline" functions that dont appear in libs, so
555 #### optimisation is required to actually inline them
556 ###PLATFORM_CFLAGS = -O
557 ###endif
558
559 #### hack for automake to have the same source file in a library and a bin
560 ###genmdesc_CFLAGS = ${AM_CFLAGS)
561
562 ###if NO_VERSION_SCRIPT
563 ###monoldflags=${export_ldflags)
564 ###monobinldflags=${export_ldflags)
565 ###else
566 ###monoldflags=-Wl,-version-script=${srcdir)/ldscript ${export_ldflags)
567 ###monobinldflags=-Wl,-version-script=${srcdir)/ldscript.mono ${export_ldflags)
568 ###endif
569
570 ###if PLATFORM_WIN32
571 ###libmono_la_LDFLAGS=-no-undefined -avoid-version -Wl,--kill-at ${monoldflags)
572 ###else
573 ###libmono_la_LDFLAGS=${monoldflags)
574 ###endif
575
576 ###if JIT_SUPPORTED
577
578 ###if PLATFORM_WIN32
579 ###bin_PROGRAMS = mono monow
580 ###else
581 ###bin_PROGRAMS = mono
582 ###endif
583
584 ###noinst_PROGRAMS = genmdesc
585
586 ###lib_LTLIBRARIES = libmono.la
587 ###noinst_LTLIBRARIES = libmono-static.la
588 ###endif
589
590 ###if DTRACE_G_REQUIRED
591 ###LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.${OBJEXT)
592 ###if STATIC_MONO
593 ###MONO_DTRACE_OBJECT = mono-dtrace.${OBJEXT)
594 ###else
595 ###MONO_DTRACE_OBJECT = 
596 ###endif
597 ###else
598 ###MONO_DTRACE_OBJECT = 
599 ###LIBMONO_DTRACE_OBJECT = 
600 ###endif
601
602 ###if STATIC_MONO
603 #### Link libmono into mono statically
604 #### This leads to higher performance, especially with TLS
605 ###MONO_LIB=libmono-static.la
606 ###else 
607 ###MONO_LIB=libmono.la
608 ###endif
609
610 ###mono_LDADD = \
611 ###     ${MONO_LIB)                     \
612 ###     ${GLIB_LIBS)            \
613 ###     ${LLVM_LIBS)            \
614 ###     -lm     \
615 ###     ${MONO_DTRACE_OBJECT)
616
617 ###mono_LDFLAGS = \
618 ###     ${static_flags} -export-dynamic ${monobinldflags)
619
620 ###if DTRACE_G_REQUIRED
621
622 ###mono-dtrace.${OBJEXT): ${top_srcdir)/data/mono.d mini.lo ${monodir)/mono/metadata/libmonoruntime-static.la
623 ###     DTRACE="${DTRACE)" DTRACEFLAGS="${DTRACEFLAGS)" AR="${AR)" ${SHELL} ${top_srcdir)/data/dtrace-prelink.sh \
624 ###     $@ ${top_srcdir)/data/mono.d ${monodir)/mono/metadata/libmonoruntime-static.la mini.lo
625
626 ###.libs/mono-dtrace.${OBJEXT): ${top_srcdir)/data/mono.d mini.lo ${monodir)/mono/metadata/libmonoruntime.la
627 ###     DTRACE="${DTRACE)" DTRACEFLAGS="${DTRACEFLAGS)" AR="${AR)" ${SHELL} ${top_srcdir)/data/dtrace-prelink.sh \
628 ###     --pic $@ ${top_srcdir)/data/mono.d ${monodir)/mono/metadata/libmonoruntime.la mini.lo
629
630 ###endif
631
632 #### Create monow.exe, linked for the 'windows' subsystem
633 ###if PLATFORM_WIN32
634 ###monow_LDADD = ${mono_LDADD)
635 ###monow_LDFLAGS = ${mono_LDFLAGS} -mwindows
636 ###monow_SOURCES = ${mono_SOURCES)
637 ###endif
638
639 #### Don't link this against libmonoruntime to speed up rebuilds
640 ###genmdesc_LDADD = \
641 ###     ${monodir)/mono/utils/libmonoutils.la ${monodir)/mono/metadata/opcodes.lo -lm   \
642 ###     ${GLIB_LIBS)
643
644 ###if ENABLE_LLVM
645 #### Disabled for now to fix the windows build
646 ####llvm_sources = \
647 ####    mini-llvm.c             \
648 ####    mini-llvm-cpp.cpp
649 ###endif
650
651 ###libmono_static_la_LIBADD = ${static_libs} ${MONO_DTRACE_OBJECT)
652
653 ###libmonoincludedir = ${includedir)/mono-${API_VER)/mono/jit
654
655 ###libmonoinclude_HEADERS = jit.h
656
657 ###libmono_la_LIBADD = \
658 ###     ${libs} ${LIBMONO_DTRACE_OBJECT)
659
660 ###clean-local:
661 ###     rm -f mono a.out gmon.out *.o buildver.h test.exe
662
663 ###pkgconfigdir = ${libdir)/pkgconfig
664
665 ###if JIT_SUPPORTED
666 ###BUILT_SOURCES = version.h ${arch_built)
667 ###else
668 ###BUILT_SOURCES = version.h
669 ###endif
670
671 ###CLEANFILES= ${BUILT_SOURCES} *.exe *.dll
672 ###EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
673 ###     genmdesc.pl     \
674 ###     ${test_sources} \
675 ###     ${x86_sources} cpu-x86.md \
676 ###     ${amd64_sources} cpu-amd64.md \
677 ###     ${ppc_sources} cpu-ppc.md cpu-ppc64.md \
678 ###     ${arm_sources} cpu-arm.md \
679 ###     ${mips_sources} cpu-mips.md \
680 ###     ${sparc_sources} cpu-sparc.md \
681 ###     ${s390_sources} cpu-s390.md \
682 ###     ${s390x_sources} cpu-s390x.md \
683 ###     ${ia64_sources} cpu-ia64.md \
684 ###     ${alpha_sources} cpu-alpha.md \
685 ###     ${hppa_sources} cpu-hppa.md     \
686 ###     ${windows_sources)              \
687 ###     ${darwin_sources)               \
688 ###     ${posix_sources)