diff options
-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 |