2020-01-16 16:38:04 +00:00
PROFILE := monowasm
SOURCEDIR := ../../src/$( PROFILE) /
CSC ?= csc
CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612,618,809
Q_CSC = $( if $( V) ,,@echo " CSC [ $( PROFILE) ] $( 1) " ; )
2020-07-10 08:44:59 +00:00
ASSEMBLIES := mscorlib System System.Xml System.Numerics System.Core System.Net.Http WebAssembly.Net.Http WebAssembly.Net.WebSockets
2020-01-16 16:38:04 +00:00
ASSEMBLIES += bare/System
# generated with (and then slightly tweaked):
# for i in *.dll; do ikdasm --assemblyref $i | grep Name= | sed 's/.*Name=//g' | sed -e $'s/$/\\\n/g' | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/ /g' -e "s/^/${i%.*}_REFS := /"; done
System.Core_REFS := mscorlib System
System.Net.Http_REFS := mscorlib System
System_REFS := mscorlib
System.Numerics_REFS := mscorlib
System.Xml_REFS := mscorlib System
WebAssembly.Net.Http_REFS := mscorlib System System.Core System.Net.Http
2020-07-10 08:44:59 +00:00
WebAssembly.Net.WebSockets_REFS := mscorlib System System.Core
2020-01-16 16:38:04 +00:00
bare/System_REFS : = mscorlib
mscorlib_CSC_ARGS := -runtimemetadataversion:v4.0.30319
System_CSC_ARGS := ../../src/mono/System.extra.cs
ECMA_KEY := ../../../../mcs/class/ecma.pub # Public Key Token: b77a5c561934e089
ECMA_KEY_ASSEMBLIES := System.Core System.Net.Http System System.Numerics System.Xml mscorlib bare/System
WebAssembly.Net.Http_KEYFILE := ../../../../mcs/class/Open.snk
2020-07-10 08:44:59 +00:00
WebAssembly.Net.WebSockets_KEYFILE := ../../../../mcs/class/Open.snk
2020-01-16 16:38:04 +00:00
all : $( addsuffix .dll , $ ( ASSEMBLIES ) )
2020-07-10 08:44:59 +00:00
clean :
rm -f *.dll
rm -f bare/*.dll
2020-01-16 16:38:04 +00:00
d e f i n e K E Y F I L E _ T E M P L A T E
$(1)_KEYFILE := $( 2)
e n d e f
d e f i n e A S S E M B L Y _ T E M P L A T E
$(1).dll : $( addprefix $ ( SOURCEDIR ) ,$ ( subst bare /,,$ ( 1) ) .cs ) $( wildcard $ ( SOURCEDIR ) $ ( 1) .extra .cs ) $( addsuffix .dll , $ ( $ ( 1) _REFS ) ) $( $ ( 1) _KEYFILE )
@mkdir -p bare/
$( Q_CSC) $( CSC) -out:$( 1) .dll $( CSC_COMMON_ARGS) -keyfile:$( $( 1) _KEYFILE) $( $( 1) _CSC_ARGS) $( addprefix -r:, $( addsuffix .dll, $( $( 1) _REFS) ) ) $( wildcard $( SOURCEDIR) $( 1) .extra.cs) $$ <
e n d e f
$( foreach asm , $ ( ECMA_KEY_ASSEMBLIES ) , $ ( eval $ ( call KEYFILE_TEMPLATE ,$ ( asm ) , $ ( ECMA_KEY ) ) ) )
$( foreach asm , $ ( ASSEMBLIES ) , $ ( eval $ ( call ASSEMBLY_TEMPLATE ,$ ( asm ) ) ) )