Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/threadframe/GNUmakefile.mingw2
diff options
context:
space:
mode:
Diffstat (limited to 'threadframe/GNUmakefile.mingw2')
-rw-r--r--threadframe/GNUmakefile.mingw218
1 files changed, 18 insertions, 0 deletions
diff --git a/threadframe/GNUmakefile.mingw2 b/threadframe/GNUmakefile.mingw2
new file mode 100644
index 0000000..f5c0df4
--- /dev/null
+++ b/threadframe/GNUmakefile.mingw2
@@ -0,0 +1,18 @@
+PYTHON:= $(shell python -c "import sys;print '%%d%%d' %% sys.version_info[:2]")
+
+threadframe.pyd: threadframe.o libpython$(PYTHON).a
+ dllwrap --dllname threadframe.pyd --driver-name=gcc --def threadframe.def -o threadframe.pyd threadframe.o -s --entry _DllMain@12 --target=i386-mingw32 -L. -lpython$(PYTHON)
+
+threadframe.o: threadframemodule.c
+ gcc -I"C:\Program Files\Python$(PYTHON)\include" -O3 -c -o $@ -DNDEBUG $<
+libpython$(PYTHON).a: python$(PYTHON).def C:\WINNT\system32\python$(PYTHON).dll
+ dlltool --dllname python$(PYTHON).dll --def python$(PYTHON).def --output-lib libpython$(PYTHON).a
+
+python$(PYTHON).def: C:\WINNT\system32\python$(PYTHON).dll
+ pexports C:\WINNT\system32\python$(PYTHON).dll > python$(PYTHON).def
+
+clean:
+ -del threadframe.pyd
+ -del libpython$(PYTHON).a
+ -del threadframe.o
+ -del python$(PYTHON).def