Support for building bf-blender under windows with gcc (huge thanks to
Florian Eggenburger). Full instructions are in doc/README.windows-gcc. Main differences from Florian's patch: - the 'lib' dir should now be the same level as the 'blender' dir (rather than being a subdir of 'blender'). This is consistent with the other platforms that bf-blender supports (tuhopuu will also adopt this convention hopefully soon). - the script 'free_windows-env.mk' is no longer needed ... see the docs about how this is overcome (again, tuhopuu will hopefully also follow this route soon). - the dlltool dir has it's own Makefile that builds all of the needed stub libraries from the dll's in cvs.
This commit is contained in:
@@ -8,6 +8,10 @@ SRCDIR = ../modules
|
||||
|
||||
TARGETDIR = $(OCGDIR)/blender/bpython/frozen
|
||||
|
||||
ifeq ($(FREE_WINDOWS),true)
|
||||
export NAN_PYTHON_BINARY = python
|
||||
endif
|
||||
|
||||
PYFLAGS=-S -O
|
||||
|
||||
default: importer
|
||||
@@ -18,7 +22,15 @@ all debug: default
|
||||
install: importer
|
||||
|
||||
importer:
|
||||
ifeq ($(FREE_WINDOWS),true)
|
||||
cp $(NAN_PYTHON)/lib/python22.dll .
|
||||
dlltool.exe -v --output-lib $(NAN_PYTHON)/lib/freepy.a \
|
||||
--input-def $(NANBLENDERHOME)/dlltool/python.def \
|
||||
--dllname python22.dll
|
||||
ranlib $(NAN_PYTHON)/lib/freepy.a
|
||||
rm ./python22.dll
|
||||
@[ -d $(TARGETDIR) ] || mkdir -p $(TARGETDIR)
|
||||
endif
|
||||
$(NAN_PYTHON_BINARY) $(PYFLAGS) freeze.py -d -x os -x pprint -x string -x copy -I $(SRCDIR) -o $(TARGETDIR) $(SRCDIR)/VRMLmain.py
|
||||
$(MAKE) -C $(TARGETDIR)
|
||||
|
||||
|
@@ -25,11 +25,15 @@ def makemakefile(outfp, makevars, files, target):
|
||||
for key in keys:
|
||||
outfp.write("%s=%s\n" % (key, makevars[key]))
|
||||
|
||||
outfp.write("\n\ninclude nan_definitions.mk\n")
|
||||
outfp.write("ifeq ($(OS),windows)\n")
|
||||
outfp.write(" CC=$(NANBLENDERHOME)/source/tools/cygwin/cl_wrapper.pl\n")
|
||||
outfp.write(" CFLAGS=-I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) $(OPT)\n")
|
||||
outfp.write("endif\n")
|
||||
outfp.write("\n\ninclude nan_definitions.mk\n")
|
||||
outfp.write("ifeq ($(OS),windows)\n")
|
||||
outfp.write(" CFLAGS=-I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) $(OPT)\n")
|
||||
outfp.write(" ifneq ($(FREE_WINDOWS),true)\n")
|
||||
outfp.write(" CC=$(NANBLENDERHOME)/source/tools/cygwin/cl_wrapper.pl\n")
|
||||
outfp.write(" else\n")
|
||||
outfp.write(" CFLAGS += -mwindows -mno-cygwin\n")
|
||||
outfp.write(" endif\n")
|
||||
outfp.write("endif\n")
|
||||
|
||||
outfp.write("\nall: %s\n\n" % libtarget)
|
||||
|
||||
|
Reference in New Issue
Block a user