GNUmakefile.mingw2 831 B

123456789101112131415161718
  1. PYTHON:= $(shell python -c "import sys;print '%%d%%d' %% sys.version_info[:2]")
  2. threadframe.pyd: threadframe.o libpython$(PYTHON).a
  3. 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)
  4. threadframe.o: threadframemodule.c
  5. gcc -I"C:\Program Files\Python$(PYTHON)\include" -O3 -c -o $@ -DNDEBUG $<
  6. libpython$(PYTHON).a: python$(PYTHON).def C:\WINNT\system32\python$(PYTHON).dll
  7. dlltool --dllname python$(PYTHON).dll --def python$(PYTHON).def --output-lib libpython$(PYTHON).a
  8. python$(PYTHON).def: C:\WINNT\system32\python$(PYTHON).dll
  9. pexports C:\WINNT\system32\python$(PYTHON).dll > python$(PYTHON).def
  10. clean:
  11. -del threadframe.pyd
  12. -del libpython$(PYTHON).a
  13. -del threadframe.o
  14. -del python$(PYTHON).def