diff options
author | davilla <davilla@4pi.com> | 2012-05-12 16:29:46 -0400 |
---|---|---|
committer | davilla <davilla@4pi.com> | 2012-05-12 16:43:51 -0400 |
commit | 17b91820f4593a57466b26f4446b6333113fde36 (patch) | |
tree | f93dfcbb245b6a4f70bbed5751693be175cd5c5e | |
parent | 9203a7c1e285db6ee5d24be1bbbb789c19368acc (diff) |
[osx] fixed, since native texturepacker uses SDL from depends, look for x86_64 in CXXFLAGS as a hint to build it 32 or 64 bit
-rw-r--r-- | lib/libsquish/Makefile.in | 10 | ||||
-rw-r--r-- | tools/TexturePacker/Makefile.in | 4 |
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/libsquish/Makefile.in b/lib/libsquish/Makefile.in index 7d76252dc1..a1f9db85c3 100644 --- a/lib/libsquish/Makefile.in +++ b/lib/libsquish/Makefile.in @@ -24,11 +24,19 @@ ifeq (@USE_TEXTUREPACKER_NATIVE@,1) NATIVE_LIB=libsquish-native.so CLEAN_FILES+=$(NATIVE_LIB) +ifeq ($(findstring osx,$(ARCH)),osx) +ifneq (,$(findstring x86_64,$(CXXFLAGS))) +NATIVE_ARCH=-m32 +else +NATIVE_ARCH=-m64 +endif +endif + all: $(LIB) $(NATIVE_LIB) # TexturePacker links to libsquish and needs to run on build system, so make a native flavor. $(NATIVE_LIB): $(SRCS) ifeq ($(findstring osx,$(ARCH)),osx) - g++ -m32 -DSQUISH_USE_SSE=2 -msse2 -I. $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@ + g++ $(NATIVE_ARCH) -DSQUISH_USE_SSE=2 -msse2 -I. $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@ else g++ -DSQUISH_USE_SSE=2 -msse2 -I. $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/libsquish-native.so -o $@ endif diff --git a/tools/TexturePacker/Makefile.in b/tools/TexturePacker/Makefile.in index fc5a80c7d5..b91a95b2d6 100644 --- a/tools/TexturePacker/Makefile.in +++ b/tools/TexturePacker/Makefile.in @@ -13,7 +13,11 @@ ifeq (@USE_TEXTUREPACKER_NATIVE@,1) NATIVE_ROOT_PATH=@USE_TEXTUREPACKER_NATIVE_ROOT@ ifdef NATIVE_ROOT_PATH ifeq ($(findstring osx,@ARCH@),osx) +ifneq (,$(findstring x86_64,$(CXXFLAGS))) CXXFLAGS+= -m32 +else +CXXFLAGS+= -m64 +endif endif CXXFLAGS+= -I$(NATIVE_ROOT_PATH)/include LIBS += -L$(NATIVE_ROOT_PATH)/lib |