Convert MONO_MARSHAL_CONV_LPSTR_STR to mono_string_to_utf16 on windows.
[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(PLATFORM_DARWIN)
204 set(mono_debugger_arch_sources mdb-debug-info32-darwin.s)
205 elseif(AMD64)
206 set(mono_debugger_arch_sources mdb-debug-info64.s)
207 elseif(X86)
208 set(mono_debugger_arch_sources mdb-debug-info32.s)
209 endif()
210 enable_language(ASM-ATT)
211 set(mono_debugger_sources debug-debugger.c debug-debugger.h ${mono_debugger_arch_sources})
212
213 set(ASM-ATT_FLAGS)
214 else(MONO_DEBUGGER_SUPPORTED)
215 set(mono_debugger_sources)
216 endif(MONO_DEBUGGER_SUPPORTED)
217
218 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)
219
220 if(X86)
221 set(arch_sources ${x86_sources} ${mono_debugger_sources})
222 set(arch_built cpu-x86.h)
223 set(arch_define __i386__)
224 endif()
225
226 if(AMD64)
227 set(arch_sources ${amd64_sources} ${mono_debugger_sources})
228 set(arch_built cpu-amd64.h)
229 set(arch_define __x86_64__)
230 endif()
231
232 if(POWERPC)
233 set(arch_sources ${ppc_sources})
234 set(arch_built cpu-ppc.h)
235 set(arch_define __ppc__)
236 endif()
237
238 if(POWERPC64)
239 set(arch_sources ${ppc_sources})
240 set(arch_built cpu-ppc64.h)
241 set(arch_define __ppc64__)
242 endif()
243
244 if(MIPS)
245 set(arch_sources ${mips_sources})
246 set(arch_built cpu-mips.h)
247 set(arch_define __mips__)
248 endif()
249
250 if(ARM)
251 # pick up arm_dpimacros.h and arm_fpamacros.h
252 set(ARCH_CFLAGS -I../arch/arm)
253 set(arch_sources ${arm_sources})
254 set(arch_built cpu-arm.h)
255 set(arch_define __arm__)
256 endif()
257
258 if(SPARC)
259 set(arch_sources ${sparc_sources})
260 set(arch_built cpu-sparc.h)
261 set(arch_define __sparc__)
262 endif()
263
264 if(SPARC64)
265 set(arch_sources ${sparc_sources})
266 set(arch_built cpu-sparc.h)
267 set(arch_define __sparc__)
268 endif()
269
270 if(S390)
271 set(arch_sources ${s390_sources})
272 set(arch_built cpu-s390.h)
273 set(arch_define __s390__)
274 endif()
275
276 if(S390x)
277 set(arch_sources ${s390x_sources})
278 set(arch_built cpu-s390x.h)
279 set(arch_define __s390__)
280 endif()
281
282 if(IA64)
283 set(arch_sources ${ia64_sources})
284 set(arch_built cpu-ia64.h)
285 set(arch_define __ia64__)
286 endif()
287
288 if(ALPHA)
289 set(arch_sources ${alpha_sources} ${mono_debugger_sources})
290 set(arch_built cpu-alpha.h)
291 set(arch_define __alpha__)
292 endif()
293
294 if(HPPA)
295 # Only support 32-bit targets for now
296 set(arch_sources ${hppa_sources})
297 set(arch_built cpu-hppa.h)
298 set(arch_define __hppa__)
299 endif()
300
301 if(HOST_WIN32)
302 set(os_sources ${windows_sources})
303 set(monobin_platform_ldflags)
304 endif()
305
306 if(PLATFORM_SIGPOSIX)
307 set(os_sources ${posix_sources})
308 set(monobin_platform_ldflags)
309 endif()
310
311 if(PLATFORM_DARWIN)
312 set(os_sources ${darwin_sources} ${posix_sources})
313 set(monobin_platform_ldflags "-sectcreate __TEXT __info_plist ${top_srcdir}/mono/mini/Info.plist")
314 endif()
315
316 #### we don't always use the perl impl because it's an additional
317 #### build dependency for the poor windows users
318 #### ${arch_define} is the preprocessor symbol that enables all the opcodes
319 #### for the specific platform in mini-ops.h
320 ###if CROSS_COMPILING
321 ###GENMDESC_PRG=perl ${srcdir)/genmdesc.pl ${arch_define} ${srcdir)
322 ###else !CROSS_COMPILING
323 set(GENMDESC_PRG ${CMAKE_CURRENT_BINARY_DIR}/genmdesc)
324 ###endif !CROSS_COMPILING
325
326 function(add_genmdesc_target target source define)
327   add_custom_command(
328         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${target}
329         COMMAND ${GENMDESC_PRG} ${CMAKE_CURRENT_BINARY_DIR}/${target} ${define} ${source}
330         DEPENDS genmdesc ${source}
331         )
332 endfunction()
333
334 foreach(arch x86 amd64 sparc ia64 alpha hppa mips)
335   add_genmdesc_target(cpu-${arch}.h cpu-${arch}.md ${arch}_desc)
336 endforeach()
337
338 add_genmdesc_target(cpu-ppc.h cpu-ppc.md ppcg4)
339 add_genmdesc_target(cpu-ppc64.h cpu-ppc64.md ppc64_cpu_desc)
340 add_genmdesc_target(cpu-arm.h cpu-arm.md arm_cpu_desc)
341 add_genmdesc_target(cpu-s390.h cpu-s390.md s390_cpu_desc)
342 add_genmdesc_target(cpu-s390x.h cpu-s390x.md s390x_cpu_desc)
343
344 include_directories(../..)
345 include_directories(${GLIB2_INCLUDE_DIRS})
346 include_directories(${LIBGC_INCLUDE_DIRS})
347 # FIXME:
348 link_directories(../../libgc/.libs)
349 set(CMAKE_C_FLAGS "${CFLAGS} ${LIBGC_CFLAGS} ${CPPFLAGS}")
350
351 # genmdesc
352 add_executable(genmdesc genmdesc.c helpers.c)
353 target_link_libraries(genmdesc monoutils-static monoruntime-static ${GLIB2_LIBRARIES})
354
355 # libmono
356
357 set(libmono_la_SOURCES ${common_sources} ${llvm_sources} ${arch_sources} ${os_sources})
358
359 # FIXME: cmake doesn't seem to recognize the ${arch_built} dependency
360 add_library(libmono-static STATIC ${libmono_la_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${arch_built})
361 target_link_libraries(libmono-static monoruntime-static monoutils-static monogc-static wapi-static ${GLIB2_LIBRARIES} ${LIBS})
362 set_target_properties(libmono-static PROPERTIES OUTPUT_NAME "mono-static")
363
364 # Since cmake has no support for convenience libraries, we have to link the
365 # final libmono.a ourselves, similarly to how libtool does it
366 add_custom_target(libmono.a
367   COMMAND rm -rf .libs/tmp libmono.a
368   COMMAND mkdir -p .libs/tmp/{1,2,3,4,5}
369   COMMAND cd .libs/tmp/1 && ar x ../../../../metadata/libmonoruntime-static.a
370   COMMAND cd .libs/tmp/2 && ar x ../../../../utils/libmonoutils-static.a
371   COMMAND cd .libs/tmp/3 && ar x ../../../../io-layer/libwapi-static.a
372   COMMAND cd .libs/tmp/3 && ar x ../../../../mini/libmono-static.a
373   COMMAND cd .libs/tmp/4 && ar x ../../../../../libgc/libmonogc-static.a
374   COMMAND ar r libmono.a `find .libs/tmp/ -name '*.o'`
375 )
376
377 # FIXME: cmake has no support for convenience libraries, so we would end up 
378 # creating a lot of shared libraries linking to each other
379 #add_library(libmono SHARED ${libmono_la_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/${arch_built})
380 #set_target_properties(libmono PROPERTIES OUTPUT_NAME "mono")
381 #target_link_libraries(libmono monoruntime monoutils monogc wapi ${GLIB2_LIBRARIES} ${LIBS})
382
383 # version.h
384
385 # Its a pain to try to pass a complex shell script to add_custom_command (), so
386 # write it to disk instead
387 # " needs to be escaped as \"
388 # \ needs to be escaped as \\
389 set(top_srcdir ../../)
390 file(WRITE create-version.h.sh "
391     if test -d ${top_srcdir}/.git/svn; then svn_info=\"git log --no-color --first-parent -n1 --grep=git-svn-id: --pretty=format:%b | sed -n -e 's,git-svn-id: \\(.*\\)@\\(.*\\) .*,URL: \\1 Revision: \\2,p'\"; fi;
392         if test -d ${srcdir}/.svn; then svn_info='svn info'; fi;
393         if test -n \"$svn_info\"; then
394                 (cd ${top_srcdir};
395                         LANG=C; export LANG;
396             branch=`eval $$svn_info | sed -n -e '/URL/ s,.*source/\\(.*\\)/mono.*,/\\1/mono,p'`;
397             version=`eval $$svn_info | sed -n -e '/Revision/ s/.*: //p'`;
398                         echo \"#define FULL_VERSION \\\"$branch r$version\\\"\";
399                 );
400         else
401                 echo \"#define FULL_VERSION \\\"tarball\\\"\";
402         fi > version.h
403 ")
404
405 # FIXME: dependencies ?
406 add_custom_command(
407   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
408   COMMAND chmod a+x ./create-version.h.sh
409   COMMAND ./create-version.h.sh
410   VERBATIM
411 )
412
413 # buildver.h
414
415 # We build this after libmono was built so it contains the date when the final
416 # link was done
417 add_custom_command(
418   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/buildver.h
419   PRE_LINK
420   COMMAND sh -c "X='\"'; echo \"const char *build_date = $X`date`$X;\" > ${CMAKE_CURRENT_BINARY_DIR}/buildver.h"
421   DEPENDS libmono-static
422   VERBATIM
423 )
424 set_source_files_properties(main.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
425 set_source_files_properties(main.c PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
426
427 # mono
428
429 add_executable(mono main.c ${CMAKE_CURRENT_BINARY_DIR}/buildver.h)
430 add_dependencies(mono libmono-static)
431 target_link_libraries(mono libmono-static ${GLIB2_LIBRARIES})
432
433 install(
434   TARGETS mono
435   RUNTIME DESTINATION bin)
436
437 # FIXME: Can't specify a dependency on libmono.a, and we don't want to build
438 # libmono.a until needed
439 install(
440   FILES libmono.a DESTINATION lib)
441
442 # Test file targets
443
444 foreach(test ${test_sources})
445   if (${test} MATCHES ".*\\.cs")
446         string(REPLACE ".cs" ".exe" exe_name ${test})
447         add_cs_exe(${exe_name} ${test} "-r:TestDriver.dll -r:generics-variant-types.dll -r:Mono.Simd.dll" "TestDriver.dll generics-variant-types.dll")
448   endif()
449 endforeach()
450
451 set(il_source "iltests.il")
452 set(exe_name "iltests.exe")
453 add_custom_command(
454   OUTPUT ${exe_name}
455   COMMAND ${ILASM} -output=${exe_name} ${il_source}
456   DEPENDS ${il_source}
457   )
458 add_custom_target(${exe_name}-exe DEPENDS ${exe_name})
459
460 add_custom_command(
461   OUTPUT "iltests.il"
462   COMMAND echo // DO NOT EDIT: This file has been generated from iltests.il.in > iltests.il
463   COMMAND cpp -Darch=${arch_define} < iltests.il.in | sed "s/^#.*//" >> iltests.il
464   DEPENDS iltests.il.in
465   VERBATIM
466 )
467
468 add_cs_dll("TestDriver.dll" "TestDriver.cs" "-r:System.dll -r:System.dll" "")
469
470 add_il_target("generics-variant-types.dll" "generics-variant-types.il" "-dll")
471   
472 # Testing targets
473
474 add_custom_target(rcheck
475   COMMAND ${RUNTIME} --regression ${regtests}
476   DEPENDS mono ${regtests}
477 )
478
479 # FIXME: make runs rcheck, but then says: 'No rule to make target `rcheck', needed by `mono/mini/CMakeFiles/check'
480 #add_custom_target(check
481 #  DEPENDS rcheck)
482 add_custom_target(check
483   COMMAND ${RUNTIME} --regression ${regtests}
484   DEPENDS mono ${regtests}
485 )
486
487 add_custom_target(testi
488   COMMAND ${RUNTIME} -v -v --ncompile 1 --compile Test:${mtest} test.exe
489   DEPENDS mono test.exe
490 )
491
492 # ensure the tests are actually correct
493 add_custom_target(checktests
494   COMMAND for i in ${regtests}\; do ${RUNTIME} $$i\; done
495   DEPENDS ${regtests}
496 )
497
498 add_custom_target(aotcheck
499   COMMAND rm -f *.exe.so
500   COMMAND ${RUNTIME} --aot ${regtests} || exit 1
501   COMMAND for i in ${regtests}\; do ${RUNTIME_AOTCHECK} --regression $$i || exit 1\; done
502   COMMAND rm -f *.exe.so
503   DEPENDS mono ${regtests}
504 )
505
506 # This currently only works on amd64/arm
507 add_custom_target(fullaotcheck
508   COMMAND       rm -rf fullaot-tmp
509   COMMAND       mkdir fullaot-tmp
510   COMMAND cp ${CLASS}/mscorlib.dll ${CLASS}/System.Core.dll ${CLASS}/System.dll ${CLASS}/Mono.Posix.dll ${CLASS}/System.Configuration.dll ${CLASS}/System.Security.dll ${CLASS}/System.Xml.dll ${CLASS}/Mono.Security.dll ${CLASS}/Mono.Simd.dll ${regtests} generics-variant-types.dll TestDriver.dll fullaot-tmp/
511   COMMAND       cp ${regtests} fullaot-tmp/
512   COMMAND       MONO_PATH=fullaot-tmp ${top_builddir}/runtime/mono-wrapper --aot=full fullaot-tmp/* || exit 1
513   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
514   DEPENDS mono ${regtests}
515 )
516
517 add_custom_target(bench
518   COMMAND time env ${RUNTIME} --ncompile ${count} --compile Test:${mtest} test.exe
519   DEPENDS mono test.exe
520 )
521
522 add_custom_target(stat1
523   COMMAND ${RUNTIME} --verbose --statfile stats.pl --regression bench.exe
524   COMMAND perl viewstat.pl stats.pl
525   DEPENDS mono bench.exe
526 )
527
528 add_custom_target(stat2
529   COMMAND ${RUNTIME} --verbose --statfile stats.pl --regression basic.exe
530   COMMAND perl viewstat.pl -e stats.pl
531   DEPENDS mono basic.exe
532 )
533
534 add_custom_target(stat3
535   COMMAND ${RUNTIME} --statfile stats.pl --ncompile 1000 --compile Tests:test_0_many_nested_loops bench.exe 
536   COMMAND perl viewstat.pl stats.pl
537   DEPENDS mono bench.exe
538 )
539
540 #### This is needed for automake dependency generation
541 ###if INCLUDED_LIBGC
542 ###libgc_libs=${monodir)/libgc/libmonogc.la
543 ###libgc_static_libs=${monodir)/libgc/libmonogc-static.la
544 ###else
545 ###libgc_libs=${LIBGC_LIBS)
546 ###libgc_static_libs=${LIBGC_STATIC_LIBS)
547 ###endif
548
549 ###AM_CFLAGS = \
550 ###     -I${top_srcdir}         \
551 ###     ${LIBGC_CFLAGS)         \
552 ###     ${GLIB_CFLAGS)
553 ###     ${PLATFORM_CFLAGS} ${ARCH_CFLAGS)
554
555 ###AM_CXXFLAGS = ${LLVM_CXXFLAGS} ${GLIB_CFLAGS)
556
557 ###if PLATFORM_WIN32
558 ###export HOST_CC
559 #### The mingw math.h has "extern inline" functions that dont appear in libs, so
560 #### optimisation is required to actually inline them
561 ###PLATFORM_CFLAGS = -O
562 ###endif
563
564 #### hack for automake to have the same source file in a library and a bin
565 ###genmdesc_CFLAGS = ${AM_CFLAGS)
566
567 ###if NO_VERSION_SCRIPT
568 ###monoldflags=${export_ldflags)
569 ###monobinldflags=${export_ldflags)
570 ###else
571 ###monoldflags=-Wl,-version-script=${srcdir)/ldscript ${export_ldflags)
572 ###monobinldflags=-Wl,-version-script=${srcdir)/ldscript.mono ${export_ldflags)
573 ###endif
574
575 ###if PLATFORM_WIN32
576 ###libmono_la_LDFLAGS=-no-undefined -avoid-version -Wl,--kill-at ${monoldflags)
577 ###else
578 ###libmono_la_LDFLAGS=${monoldflags)
579 ###endif
580
581 ###if JIT_SUPPORTED
582
583 ###if PLATFORM_WIN32
584 ###bin_PROGRAMS = mono monow
585 ###else
586 ###bin_PROGRAMS = mono
587 ###endif
588
589 ###noinst_PROGRAMS = genmdesc
590
591 ###lib_LTLIBRARIES = libmono.la
592 ###noinst_LTLIBRARIES = libmono-static.la
593 ###endif
594
595 ###if DTRACE_G_REQUIRED
596 ###LIBMONO_DTRACE_OBJECT = .libs/mono-dtrace.${OBJEXT)
597 ###if STATIC_MONO
598 ###MONO_DTRACE_OBJECT = mono-dtrace.${OBJEXT)
599 ###else
600 ###MONO_DTRACE_OBJECT = 
601 ###endif
602 ###else
603 ###MONO_DTRACE_OBJECT = 
604 ###LIBMONO_DTRACE_OBJECT = 
605 ###endif
606
607 ###if STATIC_MONO
608 #### Link libmono into mono statically
609 #### This leads to higher performance, especially with TLS
610 ###MONO_LIB=libmono-static.la
611 ###else 
612 ###MONO_LIB=libmono.la
613 ###endif
614
615 ###mono_LDADD = \
616 ###     ${MONO_LIB)                     \
617 ###     ${GLIB_LIBS)            \
618 ###     ${LLVM_LIBS)            \
619 ###     -lm     \
620 ###     ${MONO_DTRACE_OBJECT) \
621 ### ${LLVM_LDFLAGS}
622
623 ###mono_LDFLAGS = \
624 ###     ${static_flags} -export-dynamic ${monobinldflags) ${monobin_platform_ldflags}
625
626 ###if DTRACE_G_REQUIRED
627
628 ###mono-dtrace.${OBJEXT): ${top_srcdir)/data/mono.d mini.lo ${monodir)/mono/metadata/libmonoruntime-static.la
629 ###     DTRACE="${DTRACE)" DTRACEFLAGS="${DTRACEFLAGS)" AR="${AR)" ${SHELL} ${top_srcdir)/data/dtrace-prelink.sh \
630 ###     $@ ${top_srcdir)/data/mono.d ${monodir)/mono/metadata/libmonoruntime-static.la mini.lo
631
632 ###.libs/mono-dtrace.${OBJEXT): ${top_srcdir)/data/mono.d mini.lo ${monodir)/mono/metadata/libmonoruntime.la
633 ###     DTRACE="${DTRACE)" DTRACEFLAGS="${DTRACEFLAGS)" AR="${AR)" ${SHELL} ${top_srcdir)/data/dtrace-prelink.sh \
634 ###     --pic $@ ${top_srcdir)/data/mono.d ${monodir)/mono/metadata/libmonoruntime.la mini.lo
635
636 ###endif
637
638 #### Create monow.exe, linked for the 'windows' subsystem
639 ###if PLATFORM_WIN32
640 ###monow_LDADD = ${mono_LDADD)
641 ###monow_LDFLAGS = ${mono_LDFLAGS} -mwindows
642 ###monow_SOURCES = ${mono_SOURCES)
643 ###endif
644
645 #### Don't link this against libmonoruntime to speed up rebuilds
646 ###genmdesc_LDADD = \
647 ###     ${monodir)/mono/utils/libmonoutils.la ${monodir)/mono/metadata/opcodes.lo -lm   \
648 ###     ${GLIB_LIBS)
649
650 ###if ENABLE_LLVM
651 #### Disabled for now to fix the windows build
652 ####llvm_sources = \
653 ####    mini-llvm.c             \
654 ####    mini-llvm-cpp.cpp
655 ###endif
656
657 ###libmono_static_la_LIBADD = ${static_libs} ${MONO_DTRACE_OBJECT)
658
659 ###libmonoincludedir = ${includedir)/mono-${API_VER)/mono/jit
660
661 ###libmonoinclude_HEADERS = jit.h
662
663 ###libmono_la_LIBADD = \
664 ###     ${libs} ${LIBMONO_DTRACE_OBJECT)
665
666 ###clean-local:
667 ###     rm -f mono a.out gmon.out *.o buildver.h test.exe
668
669 ###pkgconfigdir = ${libdir)/pkgconfig
670
671 ###if JIT_SUPPORTED
672 ###BUILT_SOURCES = version.h ${arch_built)
673 ###else
674 ###BUILT_SOURCES = version.h
675 ###endif
676
677 ###CLEANFILES= ${BUILT_SOURCES} *.exe *.dll
678 ###EXTRA_DIST = TestDriver.cs ldscript ldscript.mono \
679 ###     genmdesc.pl     \
680 ###     ${test_sources} \
681 ###     ${x86_sources} cpu-x86.md \
682 ###     ${amd64_sources} cpu-amd64.md \
683 ###     ${ppc_sources} cpu-ppc.md cpu-ppc64.md \
684 ###     ${arm_sources} cpu-arm.md \
685 ###     ${mips_sources} cpu-mips.md \
686 ###     ${sparc_sources} cpu-sparc.md \
687 ###     ${s390_sources} cpu-s390.md \
688 ###     ${s390x_sources} cpu-s390x.md \
689 ###     ${ia64_sources} cpu-ia64.md \
690 ###     ${alpha_sources} cpu-alpha.md \
691 ###     ${hppa_sources} cpu-hppa.md     \
692 ###     ${windows_sources)              \
693 ###     ${darwin_sources) Info.plist            \
694 ###     ${posix_sources)