Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorChris Want <cwant@ualberta.ca>2003-05-25 00:04:37 +0400
committerChris Want <cwant@ualberta.ca>2003-05-25 00:04:37 +0400
commit924a8497551be7d83bb577e94ebf89b18374b874 (patch)
tree5912852343da88dcc863a56ab641e60983a5432b /source
parent94c4250d9f7ca57d9af7a7265fcdec0b4e94e5b3 (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')
-rw-r--r--source/Makefile47
-rw-r--r--source/blender/blenlib/BLI_storage_types.h2
-rw-r--r--source/blender/blenlib/BLI_winstuff.h4
-rw-r--r--source/blender/blenlib/intern/rand.c2
-rw-r--r--source/blender/blenlib/intern/winstuff.c2
-rw-r--r--source/blender/blenloader/intern/genfile.c3
-rw-r--r--source/blender/blenloader/intern/readfile.c4
-rw-r--r--source/blender/decrypt/BLO_en_de_cryptHeader.h4
-rw-r--r--source/blender/encrypt/intern/BLO_encrypt.c2
-rw-r--r--source/blender/makesdna/DNA_sdna_types.h2
-rw-r--r--source/blender/makesdna/intern/Makefile12
-rw-r--r--source/blender/readstreamglue/BLO_sys_types.h7
-rw-r--r--source/blender/render/intern/source/initrender.c6
-rw-r--r--source/blender/src/writeavicodec.c2
-rw-r--r--source/blender/verify/BLO_sign_verify_Header.h4
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h7
-rw-r--r--source/gameengine/GamePlayer/Makefile4
-rw-r--r--source/nan_compile.mk70
-rw-r--r--source/nan_definitions.mk25
-rw-r--r--source/nan_link.mk37
20 files changed, 171 insertions, 75 deletions
diff --git a/source/Makefile b/source/Makefile
index eb7b5a9300a..1e6ac83ae1d 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -138,7 +138,11 @@ PYPLAYERLIB ?= $(PYLIB)
endif
ifeq ($(WITH_FREETYPE2), true)
ifeq ($(OS), windows)
- COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
+ ifeq ($(FREE_WINDOWS), true)
+ COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
+ else
+ COMLIB += $(NAN_FREETYPE)/lib/freetype2ST.lib
+ endif
else
ifeq ($(OS), irix)
COMLIB += $(NAN_FREETYPE)/lib32/libfreetype.a
@@ -153,8 +157,7 @@ ifeq ($(INTERNATIONAL), true)
ifeq ($(FREE_WINDOWS), true)
COMLIB += $(NAN_GETTEXT)/lib/freegettext.a
COMLIB += $(NAN_FTGL)/lib/libftgl.a
- COMLIB += $(NAN_FREETYPE)/lib/libfreetype.a
- COMLIB += $(NAN_ICONV)/lib/freeiconv.a
+ #COMLIB += $(NAN_ICONV)/lib/freeiconv.a
else
COMLIB += $(NAN_GETTEXT)/lib/gnu_gettext.lib
COMLIB += $(NAN_FTGL)/lib/ftgl_static_ST.lib
@@ -211,13 +214,18 @@ endif
PULIB += $(NAN_BLENKEY)/lib/libblenkey.a
SPLIB += $(NAN_BLENKEY)/lib/libblenkey.a
- ifeq ($(OS),windows)
- PULIB += $(NAN_OPENSSL)/lib/libeay32.lib
- SPLIB += $(NAN_OPENSSL)/lib/libeay32.lib
- else
- PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
- SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
- endif
+ ifeq ($(OS),windows)
+ ifeq ($(FREE_WINDOWS),true)
+ PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
+ SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
+ else
+ PULIB += $(NAN_OPENSSL)/lib/libeay32.lib
+ SPLIB += $(NAN_OPENSSL)/lib/libeay32.lib
+ endif
+ else
+ PULIB += $(NAN_OPENSSL)/lib/libcrypto.a
+ SPLIB += $(NAN_OPENSSL)/lib/libcrypto.a
+ endif
# These three need to be explicitly mentioned on the cl, because
# if they are offered as a lib, they are optimized away. (nzc)
@@ -395,7 +403,12 @@ else
endif
ifeq ($(OS),windows)
- PYLIB = $(NAN_PYTHON)/lib/python22.lib
+ ifeq ($(FREE_WINDOWS),true)
+ PYLIB = $(NAN_PYTHON)/lib/freepy.a
+ else
+ PYLIB = $(NAN_PYTHON)/lib/python22.lib
+ endif
+
PYPLAYERLIB = $(NAN_PYTHON)/static/*.obj
PYPLAYERLIB = $(PYLIB)
@@ -403,9 +416,11 @@ ifeq ($(OS),windows)
NSPLUGLIB += $(NAN_NSPR)/lib/nspr4.lib
BINTARGETS = blenderdynamic
- BINTARGETS += blenderplayer
- BINTARGETS += blenderdynplayer
- BINTARGETS += plugin
+ ifneq ($(FREE_WINDOWS),true)
+ BINTARGETS += blenderplayer
+ BINTARGETS += blenderdynplayer
+ BINTARGETS += plugin
+ endif
PULIB += $(OCGDIR)/blender/icons/$(DEBUG_DIR)winblender.res
PULIB += $(NAN_ZLIB)/lib/libz.a
@@ -513,7 +528,9 @@ ifeq ($(OS),$(findstring $(OS), "freebsd linux irix solaris"))
endif
# Windows needs a 8.3 name... Why? Dunno...
ifeq ($(OS),windows)
- plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
+ ifneq ($(FREE_WINDOWS),true)
+ plugin: $(DIR)/$(DEBUG_DIR)npB3DPlg$(SOEXT)
+ endif
endif
$(DIR)/$(DEBUG_DIR)blenderstatic: $(OBJS) $(GRPLIB) $(COMLIB) $(PULIB)
diff --git a/source/blender/blenlib/BLI_storage_types.h b/source/blender/blenlib/BLI_storage_types.h
index 2b756e26f5b..825a8bc9cbd 100644
--- a/source/blender/blenlib/BLI_storage_types.h
+++ b/source/blender/blenlib/BLI_storage_types.h
@@ -48,7 +48,7 @@ struct header{
char fill[HDRSIZE-NAMSIZE-2*sizeof(unsigned int)];
};
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
typedef unsigned int mode_t;
#endif
diff --git a/source/blender/blenlib/BLI_winstuff.h b/source/blender/blenlib/BLI_winstuff.h
index b09fcbafa8c..b9f92aedb98 100644
--- a/source/blender/blenlib/BLI_winstuff.h
+++ b/source/blender/blenlib/BLI_winstuff.h
@@ -69,7 +69,9 @@
#define S_ISDIR(x) ((x&S_IFMT) == S_IFDIR)
#endif
+#ifndef FREE_WINDOWS
typedef unsigned int mode_t;
+#endif
struct dirent {
int d_ino;
@@ -91,8 +93,10 @@ typedef struct _DIR {
} DIR;
void RegisterBlendExtension(char * str);
+#ifndef FREE_WINDOWS
int strcasecmp (char *s1, char *s2);
int strncasecmp (char *s1, char *s2, int n);
+#endif
DIR *opendir (const char *path);
struct dirent *readdir(DIR *dp);
int closedir (DIR *dp);
diff --git a/source/blender/blenlib/intern/rand.c b/source/blender/blenlib/intern/rand.c
index e7c9ec1c864..1166932019a 100644
--- a/source/blender/blenlib/intern/rand.c
+++ b/source/blender/blenlib/intern/rand.c
@@ -36,7 +36,7 @@
#include <config.h>
#endif
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
typedef unsigned __int64 r_uint64;
#else
typedef unsigned long long r_uint64;
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index 2a69bf0b1e5..3a4491dedaa 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -134,6 +134,7 @@ static void strnlower (char *str, int n) {
}
}
+#ifndef FREE_WINDOWS
int strcasecmp (char *s1, char *s2) {
char *st1, *st2;
int r;
@@ -174,6 +175,7 @@ int strncasecmp (char *s1, char *s2, int n) {
return r;
}
+#endif
DIR *opendir (const char *path) {
if (GetFileAttributes(path) & FILE_ATTRIBUTE_DIRECTORY) {
diff --git a/source/blender/blenloader/intern/genfile.c b/source/blender/blenloader/intern/genfile.c
index f985879de32..ea7f6dc2985 100644
--- a/source/blender/blenloader/intern/genfile.c
+++ b/source/blender/blenloader/intern/genfile.c
@@ -61,6 +61,9 @@
#include "genfile.h"
+#ifdef FREE_WINDOWS
+typedef long long __int64;
+#endif
/*
* - please note: no builtin security to detect input of double structs
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 609b99b9f15..5b5632401ba 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -498,7 +498,7 @@ static void switch_endian_bh8(BHead8 *bhead)
static void bh4_from_bh8(BHead *bhead, BHead8 *bhead8, int do_endian_swap)
{
BHead4 *bhead4 = (BHead4 *) bhead;
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
__int64 old;
#else
long long old;
@@ -1052,7 +1052,7 @@ static void link_glob_list(FileData *fd, ListBase *lb) /* for glob data */
static void test_pointer_array(FileData *fd, void **mat)
{
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
__int64 *lpoin, *lmat;
#else
long long *lpoin, *lmat;
diff --git a/source/blender/decrypt/BLO_en_de_cryptHeader.h b/source/blender/decrypt/BLO_en_de_cryptHeader.h
index fd9f634c27e..a555e66e800 100644
--- a/source/blender/decrypt/BLO_en_de_cryptHeader.h
+++ b/source/blender/decrypt/BLO_en_de_cryptHeader.h
@@ -40,6 +40,10 @@ extern "C" {
#include "BLO_sys_types.h"
+#ifdef FREE_WINDOWS
+typedef int int32_t;
+#endif
+
#define EN_DE_CRYPTHEADERSTRUCTSIZE sizeof(struct BLO_en_de_cryptHeaderStruct)
// Tests showed: pubKeyLen 64, cryptedKeyLen 64 bytes
diff --git a/source/blender/encrypt/intern/BLO_encrypt.c b/source/blender/encrypt/intern/BLO_encrypt.c
index ce44baf5e22..3353a1fd69f 100644
--- a/source/blender/encrypt/intern/BLO_encrypt.c
+++ b/source/blender/encrypt/intern/BLO_encrypt.c
@@ -91,8 +91,10 @@ BLO_encrypt(
}
#ifdef _WIN32
+#ifndef FREE_WINDOWS
RAND_screen();
#endif
+#endif
RAND_bytes(cryptKey, cryptKeyLen);
RC4_set_key(rc4_key, cryptKeyLen, cryptKey);
diff --git a/source/blender/makesdna/DNA_sdna_types.h b/source/blender/makesdna/DNA_sdna_types.h
index cdc0c33fb42..8553a3868d1 100644
--- a/source/blender/makesdna/DNA_sdna_types.h
+++ b/source/blender/makesdna/DNA_sdna_types.h
@@ -70,7 +70,7 @@ typedef struct BHead4 {
#
typedef struct BHead8 {
int code, len;
-#ifdef WIN32
+#if defined(WIN32) && !defined(FREE_WINDOWS)
/* This is a compiler type! */
__int64 old;
#else
diff --git a/source/blender/makesdna/intern/Makefile b/source/blender/makesdna/intern/Makefile
index d6a762156ca..84d854064d7 100644
--- a/source/blender/makesdna/intern/Makefile
+++ b/source/blender/makesdna/intern/Makefile
@@ -54,10 +54,14 @@ ifeq ($(OS),windows)
# _really_ needed, but it is the easiest fix for now. If you have
# some spare time, try to trace down the exact dep. Then again, you
# could also spend that time making the sdna system more robust.
- WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
- WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
- WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
- WINLIBS += /link /nodefaultlib:libc
+ ifneq ($(FREE_WINDOWS),true)
+ WINLIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
+ WINLIBS += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+ WINLIBS += winmm.lib opengl32.lib glu32.lib largeint.lib
+ WINLIBS += /link /nodefaultlib:libc
+ else
+ LDFLAGS += -mwindows -mno-cygwin
+ endif
endif
clean::
diff --git a/source/blender/readstreamglue/BLO_sys_types.h b/source/blender/readstreamglue/BLO_sys_types.h
index 4333f74465d..38dde20500e 100644
--- a/source/blender/readstreamglue/BLO_sys_types.h
+++ b/source/blender/readstreamglue/BLO_sys_types.h
@@ -47,7 +47,12 @@
extern "C" {
#endif
-#ifdef _WIN32
+#ifdef FREE_WINDOWS
+typedef unsigned char uint8_t;
+typedef unsigned int uint32_t;
+#endif
+
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
/* The __intXX are built-in types of the visual complier! So we don't
* need to include anything else here. */
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index 4aa8d5cf02d..bd331aa44d8 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -1260,7 +1260,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype==R_MOVIE) {
start_movie();
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) {
start_avi_codec();
#endif
@@ -1290,7 +1290,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype == R_MOVIE) {
append_movie((G.scene->r.cfra));
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) {
append_avi_codec((G.scene->r.cfra));
#endif
@@ -1330,7 +1330,7 @@ void RE_animrender(struct View3D *ogl_render_view3d)
} else if (R.r.imtype==R_MOVIE) {
end_movie();
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
} else if (R.r.imtype == R_AVICODEC) {
end_avi_codec();
#endif
diff --git a/source/blender/src/writeavicodec.c b/source/blender/src/writeavicodec.c
index b729b1d944d..1b6a9776515 100644
--- a/source/blender/src/writeavicodec.c
+++ b/source/blender/src/writeavicodec.c
@@ -37,7 +37,7 @@
#include <config.h>
#endif
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(FREE_WINDOWS)
#define INC_OLE2
#include <windows.h>
diff --git a/source/blender/verify/BLO_sign_verify_Header.h b/source/blender/verify/BLO_sign_verify_Header.h
index 8f26eed95aa..d2290dc4ad7 100644
--- a/source/blender/verify/BLO_sign_verify_Header.h
+++ b/source/blender/verify/BLO_sign_verify_Header.h
@@ -38,6 +38,10 @@
extern "C" {
#endif
+#ifdef FREE_WINDOWS
+typedef int int32_t;
+#endif
+
#include "BLO_sys_types.h"
#define SIGNVERIFYHEADERSTRUCTSIZE sizeof(struct BLO_sign_verify_HeaderStruct)
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h
index 24cd17415ac..02bae96d840 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h
+++ b/source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h
@@ -36,11 +36,16 @@
#pragma warning(disable : 4786) // shut off 255 char limit debug template warning
#endif
+#include <map>
+
/* need to be here for conversion purposes */
+#ifdef FREE_WINDOWS
+#undef HKEY
+#endif
+
#include "mydevice.h"
#include "SCA_IInputDevice.h"
-#include <map>
/**
Base Class for Blender specific inputdevices. Blender specific inputdevices are used when the gameengine is running in embedded mode instead of standalone mode.
*/
diff --git a/source/gameengine/GamePlayer/Makefile b/source/gameengine/GamePlayer/Makefile
index 49f47a4d4a0..fab44ad9bc7 100644
--- a/source/gameengine/GamePlayer/Makefile
+++ b/source/gameengine/GamePlayer/Makefile
@@ -38,7 +38,9 @@ DIR = $(OCGDIR)/gameengine/GamePlayer
DIRS = common ghost
ifeq ($(OS),$(findstring $(OS), "freebsd irix windows"))
- DIRS += netscape
+ ifneq ($(FREE_WINDOWS),true)
+ DIRS += netscape
+ endif
endif
ifeq ($(OS),$(findstring $(OS), "linux"))
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
diff --git a/source/nan_definitions.mk b/source/nan_definitions.mk
index 442660dd3f0..401e09752c8 100644
--- a/source/nan_definitions.mk
+++ b/source/nan_definitions.mk
@@ -74,7 +74,11 @@ all debug::
export NAN_GHOST ?= $(LCGDIR)/ghost
export NAN_TEST_VERBOSITY ?= 1
export NAN_BMFONT ?= $(LCGDIR)/bmfont
- export NAN_FTGL ?= $(LCGDIR)/ftgl
+ ifeq ($(FREE_WINDOWS), true)
+ export NAN_FTGL ?= $(LCGDIR)/gcc/ftgl
+ else
+ export NAN_FTGL ?= $(LCGDIR)/ftgl
+ endif
# Platform Dependent settings go below:
@@ -379,7 +383,17 @@ all debug::
export NAN_PYTHON ?= $(LCGDIR)/python
export NAN_ICONV ?= $(LCGDIR)/iconv
export NAN_PYTHON_VERSION ?= 2.2
- export NAN_PYTHON_BINARY ?= python
+ ifeq ($(FREE_WINDOWS), true)
+ export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
+ export NAN_OPENSSL ?= $(LCGDIR)/gcc/openssl
+ export NAN_FREETYPE ?= $(LCGDIR)/gcc/freetype
+ export NAN_ODE ?= $(LCGDIR)/gcc/ode
+ else
+ export NAN_PYTHON_BINARY ?= python
+ export NAN_OPENSSL ?= $(LCGDIR)/openssl
+ export NAN_FREETYPE ?= $(LCGDIR)/freetype
+ export NAN_ODE ?= $(LCGDIR)/ode
+ endif
export NAN_MXTEXTTOOLS ?= $(shell $(NAN_PYTHON_BINARY) -c \
'import mx; print mx.__path__[0]')/TextTools/mxTextTools/mxTextTools.so
export NAN_OPENAL ?= $(LCGDIR)/openal
@@ -387,13 +401,10 @@ all debug::
export NAN_JPEG ?= $(LCGDIR)/jpeg
export NAN_PNG ?= $(LCGDIR)/png
export NAN_SDL ?= $(LCGDIR)/sdl
- export NAN_ODE ?= $(LCGDIR)/ode
- export NAN_OPENSSL ?= $(LCGDIR)/openssl
export NAN_TERRAPLAY ?= $(LCGDIR)/terraplay
export NAN_MESA ?= /usr/src/Mesa-3.1
export NAN_ZLIB ?= $(LCGDIR)/zlib
export NAN_NSPR ?= $(LCGDIR)/nspr
- export NAN_FREETYPE ?= $(LCGDIR)/freetype
export NAN_GETTEXT ?= $(LCGDIR)/gettext
# Uncomment the following line to use Mozilla inplace of netscape
@@ -403,7 +414,7 @@ all debug::
export NAN_MOZILLA_LIB ?= $(LCGDIR)/mozilla/lib/
# Will fall back to look in NAN_MOZILLA_INC/nspr and NAN_MOZILLA_LIB
# if this is not set.
-
+export NAN_PYTHON_BINARY ?= python
export NAN_BUILDINFO ?= true
# Be paranoid regarding library creation (do not update archives)
export NAN_PARANOID ?= true
@@ -421,7 +432,7 @@ all debug::
export NAN_PYTHON ?= $(LCGDIR)/python
export NAN_PYTHON_VERSION ?= 2.0
- export NAN_PYTHON_BINARY ?= $(NAN_PYTHON)/bin/python$(NAN_PYTHON_VERSION)
+ export NAN_PYTHON_BINARY ?= python
export NAN_MXTEXTTOOLS ?= $(shell $(NAN_PYTHON_BINARY) -c \
'import mx; print mx.__path__[0]')/TextTools/mxTextTools/mxTextTools.so
export NAN_OPENAL ?= $(LCGDIR)/openal
diff --git a/source/nan_link.mk b/source/nan_link.mk
index 1006bf6d9dd..88d2c12ebd8 100644
--- a/source/nan_link.mk
+++ b/source/nan_link.mk
@@ -59,7 +59,7 @@ ifeq ($(OS),darwin)
LLIBS += -lGLU -lGL
LLIBS += -lz -framework Carbon -framework AGL
ifeq ($(WITH_QUICKTIME), true)
- LLIBS += -framework QuickTime
+ LLIBS += -framework QuickTime
endif
LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
DBG_LDFLAGS += -L/System/Library/Frameworks/OpenGL.framework/Libraries
@@ -124,19 +124,26 @@ endif
ifeq ($(OS),windows)
EXT = .exe
SOEXT = .dll
- DADD = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
- DADD += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
- DADD += vfw32.lib winmm.lib opengl32.lib glu32.lib largeint.lib dxguid.lib
- DADD += libcmt.lib
- LOPTS = /link
- LOPTS += /NODEFAULTLIB:"libc"
- LOPTS += /NODEFAULTLIB:"libcd"
- LOPTS += /NODEFAULTLIB:"libcp"
- LOPTS += /NODEFAULTLIB:"libcpd"
- LOPTS += /NODEFAULTLIB:"python20"
- LOPTS += /NODEFAULTLIB:"msvcrt"
- LOPTS += /SUBSYSTEM:CONSOLE
- LDFLAGS += /MT
- DYNLDFLAGS = /LD
+ ifeq ($(FREE_WINDOWS),true)
+ MINGWLIB = /usr/lib/w32api
+ LDFLAGS += -mwindows -mno-cygwin -mconsole
+ DADD += -L/usr/lib/w32api -lnetapi32 -lopengl32 -lglu32
+ DADD += -L/usr/lib/w32api
+ else
+ DADD = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
+ DADD += advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
+ DADD += vfw32.lib winmm.lib opengl32.lib glu32.lib largeint.lib dxguid.lib
+ DADD += libcmt.lib
+ LOPTS = /link
+ LOPTS += /NODEFAULTLIB:"libc"
+ LOPTS += /NODEFAULTLIB:"libcd"
+ LOPTS += /NODEFAULTLIB:"libcp"
+ LOPTS += /NODEFAULTLIB:"libcpd"
+ LOPTS += /NODEFAULTLIB:"python20"
+ LOPTS += /NODEFAULTLIB:"msvcrt"
+ LOPTS += /SUBSYSTEM:CONSOLE
+ LDFLAGS += /MT
+ DYNLDFLAGS = /LD
+ endif
endif