forked from pythonnet/pythonnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
executable file
·99 lines (74 loc) · 2.28 KB
/
makefile
File metadata and controls
executable file
·99 lines (74 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Makefile for the PythonRuntime .NET assembly and tests. Thanks to
# Camilo Uribe <[email protected]> for contributing Mono support.
RELEASE=pythonnet-1.0-rc2-py2.4-clr1.1-src
RUNNER=
ILDASM=ildasm
ILASM=ilasm
CSC=csc.exe
all: python.exe CLR.dll Python.Test.dll
python.exe: Python.Runtime.dll
cd src; cd console; \
$(CSC) /nologo /target:exe /out:../../python.exe \
/reference:../../Python.Runtime.dll /recurse:*.cs
cd ..; cd ..;
Python.Runtime.dll: callconvutil.exe
cd src; cd runtime; \
$(CSC) /nologo /unsafe /target:library /out:../../Python.Runtime.dll \
/recurse:*.cs
cd ..; cd ..;
$(ILDASM) /nobar Python.Runtime.dll /out=Python.Runtime.il;
$(RUNNER) ./callconvutil.exe;
$(ILASM) /nologo /quiet /dll \
/resource=Python.Runtime.res /output=Python.Runtime.dll \
Python.Runtime.il2;
rm -f Python.Runtime.il;
rm -f Python.Runtime.il2;
rm -f Python.Runtime.res;
rm -f ./callconvutil.exe;
CLR.dll: Python.Runtime.dll
$(ILASM) /nologo /dll /quiet /output=CLR.dll \
./src/runtime/clrmodule.il;
Python.Test.dll: Python.Runtime.dll
cd src; cd testing; \
$(CSC) /nologo /target:library /out:../../Python.Test.dll \
/reference:../../Python.Runtime.dll \
/recurse:*.cs
cd ..; cd ..;
callconvutil.exe:
cd src; cd tools; \
$(CSC) /nologo /target:exe /out:../../callconvutil.exe \
/recurse:*.cs
cd ..; cd ..;
clean:
rm -f python.exe Python*.dll Python*.il Python*.il2 Python*.res
rm -f callconvutil.exe
rm -f CLR.dll
rm -f ./*~
cd src; cd console; rm -f *~; cd ..; cd ..;
cd src; cd runtime; rm -f *~; cd ..; cd ..;
cd src; cd testing; rm -f *~; cd ..; cd ..;
cd src; cd tests; rm -f *~; rm -f *.pyc; cd ..; cd ..;
cd src; cd tools; rm -f *~; cd ..; cd ..;
cd doc; rm -f *~; cd ..;
cd demo; rm -f *~; cd ..;
test:
rm -f ./src/tests/*.pyc
$(RUNNER) ./python.exe ./src/tests/runtests.py
dist: clean
mkdir ./$(RELEASE)
cp -R ./makefile ./$(RELEASE)/
cp -R ./demo ./$(RELEASE)/
cp -R ./doc ./$(RELEASE)/
cp -R ./src ./$(RELEASE)/
make
cp ./python.exe ./$(RELEASE)/
cp ./*.dll ./$(RELEASE)/
tar czf $(RELEASE).tgz ./$(RELEASE)/
mv $(RELEASE).tgz ./release/
rm -rf ./$(RELEASE)/
dis:
$(ILDASM) Python.Runtime.dll /out=Python.Runtime.il
asm:
$(ILASM) /dll /quiet \
/resource=Python.Runtime.res /output=Python.Runtime.dll \
Python.Runtime.il