diff options
author | Chris Want <cwant@ualberta.ca> | 2003-05-25 00:04:37 +0400 |
---|---|---|
committer | Chris Want <cwant@ualberta.ca> | 2003-05-25 00:04:37 +0400 |
commit | 924a8497551be7d83bb577e94ebf89b18374b874 (patch) | |
tree | 5912852343da88dcc863a56ab641e60983a5432b /source/nan_compile.mk | |
parent | 94c4250d9f7ca57d9af7a7265fcdec0b4e94e5b3 (diff) |
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.
Diffstat (limited to 'source/nan_compile.mk')
-rw-r--r-- | source/nan_compile.mk | 70 |
1 files changed, 48 insertions, 22 deletions
diff --git a/source/nan_compile.mk b/source/nan_compile.mk index df0fa368446..f023d43402e 100644 --- a/source/nan_compile.mk +++ b/source/nan_compile.mk @@ -174,28 +174,47 @@ ifeq ($(OS),solaris) endif ifeq ($(OS),windows) - CC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl - CCC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl - JAVAC = $(SRCHOME)/tools/cygwin/java_wrapper.pl -c - JAVAH = $(SRCHOME)/tools/cygwin/java_wrapper.pl -h - REL_CFLAGS += /O2 - REL_CCFLAGS += /O2 -GX - DBG_CFLAGS += /Fd$(DIR)/debug/ - DBG_CCFLAGS += /Fd$(DIR)/debug/ - CFLAGS += /MT - CCFLAGS += /MT - NAN_DEPEND = true - OPENGL_HEADERS = . - CPPFLAGS += -DWIN32 -D_WIN32 -D__WIN32 - CPPFLAGS += -D_M_IX86 - CPPFLAGS += -I"/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/include" - JAVA_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include - JAVA_SYSTEM_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include/win32 - CPP = $(SRCHOME)/tools/cygwin/cl_wrapper.pl - AR = ar - ARFLAGS = ruv - ARFLAGSQUIET = ru - WINRC = $(wildcard *.rc) + ifeq ($(FREE_WINDOWS),true) + CC = gcc + CCC = g++ + CFLAGS += -pipe -mno-cygwin -mwindows + CCFLAGS += -pipe -mno-cygwin -mwindows + CPPFLAGS += -DFREE_WINDOWS + #CPPFLAGS += -I/usr/include/mingw + REL_CFLAGS += -O2 + REL_CCFLAGS += -O2 + #NAN_DEPEND = true + #OPENGL_HEADERS = /usr/include/w32api + OPENGL_HEADERS = ./ + AR = ar + ARFLAGS = ruv + ARFLAGSQUIET = ru + WINRC = $(wildcard *.rc) + RANLIB = ranlib + else + CC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl + CCC = $(SRCHOME)/tools/cygwin/cl_wrapper.pl + JAVAC = $(SRCHOME)/tools/cygwin/java_wrapper.pl -c + JAVAH = $(SRCHOME)/tools/cygwin/java_wrapper.pl -h + REL_CFLAGS += /O2 + REL_CCFLAGS += /O2 -GX + DBG_CFLAGS += /Fd$(DIR)/debug/ + DBG_CCFLAGS += /Fd$(DIR)/debug/ + CFLAGS += /MT + CCFLAGS += /MT + NAN_DEPEND = true + OPENGL_HEADERS = . + CPPFLAGS += -DWIN32 -D_WIN32 -D__WIN32 + CPPFLAGS += -D_M_IX86 + CPPFLAGS += -I"/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/include" + JAVA_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include + JAVA_SYSTEM_HEADERS = /cygdrive/c/j2sdk1.4.0-beta3/include/win32 + CPP = $(SRCHOME)/tools/cygwin/cl_wrapper.pl + AR = ar + ARFLAGS = ruv + ARFLAGSQUIET = ru + WINRC = $(wildcard *.rc) + endif endif ifeq (debug, $(findstring debug, $(MAKECMDGOALS))) @@ -245,8 +264,15 @@ $(DIR)/$(DEBUG_DIR)%.o: %.cpp $(CCC) -c $(CCFLAGS) $(CPPFLAGS) $< -o $@ endif +#$(DIR)/$(DEBUG_DIR)%.res: %.rc +# $(SRCHOME)/tools/cygwin/cl_wrapper.pl - rc /fo$@ $< + $(DIR)/$(DEBUG_DIR)%.res: %.rc +ifeq ($(FREE_WINDOWS),true) + windres $< -O coff -o $@ +else $(SRCHOME)/tools/cygwin/cl_wrapper.pl - rc /fo$@ $< +endif $(DIR)/$(DEBUG_DIR)%.class: %.java ifdef JARS |