Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/threadframe/GNUmakefile.mingw2
blob: f5c0df4e598689b412ba8e39f2139946a76884eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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