diff options
author | Stephan Raue <stephan@openelec.tv> | 2013-09-03 05:37:05 +0200 |
---|---|---|
committer | Stephan Raue <stephan@openelec.tv> | 2013-09-03 05:37:05 +0200 |
commit | 59109579ecfe7622fea2283d1391ca4da07aa9a7 (patch) | |
tree | ba214e09e261e55cb7e376cb8fa3f669620bb2af /lib | |
parent | 3a03d3cfc95f8d8b77a583d8556000fafce358c0 (diff) |
libsquish: rework to support native builds with *_FOR_BUILD
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libsquish/Makefile.in | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/lib/libsquish/Makefile.in b/lib/libsquish/Makefile.in index 34f93bdeea..ef57bb884d 100644 --- a/lib/libsquish/Makefile.in +++ b/lib/libsquish/Makefile.in @@ -11,26 +11,24 @@ SRCS= \ singlecolourfit.cpp \ squish.cpp -CXXFLAGS+=-I. - -LIB=libsquish.a - -ifeq (@USE_TEXTUREPACKER_NATIVE@,1) -NATIVE_LIB=libsquish-native.so -CLEAN_FILES+=$(NATIVE_LIB) +CXXFLAGS += -I. +CXXFLAGS_FOR_BUILD += -I. +LIB = libsquish.a +NATIVE_LIB = libsquish-native.so +CLEAN_FILES += $(NATIVE_LIB) ifeq ($(findstring Darwin,$(shell uname -s)),Darwin) -NATIVE_ARCH=@DARWIN_NATIVE_ARCH@ + CXXFLAGS_FOR_BUILD += @DARWIN_NATIVE_ARCH@ endif -all: $(LIB) $(NATIVE_LIB) +all: $(LIB) + # TexturePacker links to libsquish and needs to run on build system, so make a native flavor. $(NATIVE_LIB): $(SRCS) ifeq ($(findstring Darwin,$(shell uname -s)),Darwin) - g++ $(NATIVE_ARCH) -I. $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@ + $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $(SRCS) -dynamiclib -install_name `pwd`/$(NATIVE_LIB) -o $@ else - g++ -I. $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/libsquish-native.so -o $@ -endif + $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/$(NATIVE_LIB) -o $@ endif include ../../Makefile.include |