diff options
author | Stephan Raue <stephan@openelec.tv> | 2013-09-03 05:44:33 +0200 |
---|---|---|
committer | Stephan Raue <stephan@openelec.tv> | 2013-09-03 06:54:44 +0200 |
commit | 2108f29aa7f60ed03afea65b262cec5ca1ed5ab9 (patch) | |
tree | 37f43cb424bef6f308624a7a1425558be224b3f6 /tools/TexturePacker | |
parent | 59109579ecfe7622fea2283d1391ca4da07aa9a7 (diff) |
Texturepacker: rework to support native builds with *_FOR_BUILD, Texturepacker builds always against libsquish-native.so, which is ok because CXX_FOR_BUILD=CXX, CXXFLAGS_FOR_BUILD=CXXFLAGS and LDFLAGS_FOR_BUILD=LDFLAGS on non crosscompiled builds, sothere libsquish-native is the same like libsquish
Diffstat (limited to 'tools/TexturePacker')
-rw-r--r-- | tools/TexturePacker/Makefile.in | 62 |
1 files changed, 19 insertions, 43 deletions
diff --git a/tools/TexturePacker/Makefile.in b/tools/TexturePacker/Makefile.in index 343182cfc9..4f0b610211 100644 --- a/tools/TexturePacker/Makefile.in +++ b/tools/TexturePacker/Makefile.in @@ -1,61 +1,37 @@ -DEFINES += -DTARGET_POSIX -DUSE_LZO_PACKING +DEFINES += -DTARGET_POSIX -DUSE_LZO_PACKING ifneq ($(or $(findstring powerpc,@ARCH@),$(findstring ppc, @ARCH@)),) -DEFINES += -DHOST_BIGENDIAN +DEFINES += -DHOST_BIGENDIAN endif -CXXFLAGS+= \ +SRCS = \ + md5.cpp \ + SDL_anigif.cpp \ + XBTFWriter.cpp \ + XBMCTex.cpp \ + @abs_top_srcdir@/xbmc/guilib/XBTF.cpp + +TARGET = TexturePacker +CLEAN_FILES = $(TARGET) + +CXXFLAGS_FOR_BUILD += \ -I. \ -I@abs_top_srcdir@/lib \ -I@abs_top_srcdir@/xbmc \ -I@abs_top_srcdir@/xbmc/linux -RPATH=-Wl,-rpath=$(NATIVE_ROOT_PATH)/lib +LDFLAGS_FOR_BUILD += -lSDL_image -lSDL -llzo2 +LDFLAGS_FOR_BUILD += -L@abs_top_srcdir@/lib/libsquish -lsquish-native -ifeq (@USE_TEXTUREPACKER_NATIVE@,1) -NATIVE_ROOT_PATH=@NATIVE_ROOT@ -ifdef NATIVE_ROOT_PATH ifeq ($(findstring Darwin,$(shell uname -s)),Darwin) DEFINES += -DTARGET_DARWIN NATIVE_ARCH=@DARWIN_NATIVE_ARCH@ -RPATH= -endif -NATIVE_CXXFLAGS+= -I. \ - -I$(NATIVE_ROOT_PATH)/include \ - -I@abs_top_srcdir@/lib \ - -I@abs_top_srcdir@/xbmc \ - -I@abs_top_srcdir@/xbmc/linux -NATIVE_LIBS += -L$(NATIVE_ROOT_PATH)/lib -endif -NATIVE_LIBS += -lSDL_image -lSDL -llzo2 -NATIVE_LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish-native -else -LIBS += -L@abs_top_srcdir@/lib/libsquish -lsquish endif -LIBS += -lSDL_image -lSDL -llzo2 - -SRCS = \ - md5.cpp \ - SDL_anigif.cpp \ - XBTFWriter.cpp \ - XBMCTex.cpp \ - @abs_top_srcdir@/xbmc/guilib/XBTF.cpp - - -TARGET = TexturePacker -CLEAN_FILES=$(TARGET) - all: $(TARGET) -ifeq (@USE_TEXTUREPACKER_NATIVE@,1) -# TexturePacker run native on build system, build it with native tools $(TARGET): $(SRCS) @abs_top_srcdir@/xbmc/guilib/XBTF.h - g++ $(DEFINES) $(NATIVE_ARCH) $(NATIVE_CXXFLAGS) $(SRCS) $(NATIVE_LIBS) $(RPATH) -o $(TARGET) -clean: - rm -f $(TARGET) -else -include @abs_top_srcdir@/Makefile.include +# TexturePacker run native on build system, build it with native tools + make -C @abs_top_srcdir@/lib/libsquish/ libsquish-native.so + $(CXX_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) $(DEFINES) $(NATIVE_ARCH) $(SRCS) $(LDFLAGS_FOR_BUILD) -o $(TARGET) -$(TARGET): $(SRCS) @abs_top_srcdir@/xbmc/guilib/XBTF.h - $(CXX) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(SRCS) $(LDFLAGS) $(LIBS) -o $(TARGET) -endif +include @abs_top_srcdir@/Makefile.include |