aboutsummaryrefslogtreecommitdiff
path: root/tools/TexturePacker/Makefile.in
blob: fcaeca3cf342493cee3d479a51e2887cbb5c729a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
DEFINES += -D_LINUX -DUSE_LZO_PACKING
ifneq ($(or $(findstring powerpc,@ARCH@),$(findstring ppc, @ARCH@)),)
DEFINES += -DHOST_BIGENDIAN
endif

CXXFLAGS+= \
  -I. \
  -I@abs_top_srcdir@/lib \
  -I@abs_top_srcdir@/xbmc \
  -I@abs_top_srcdir@/xbmc/linux

ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
NATIVE_ROOT_PATH=@USE_TEXTUREPACKER_NATIVE_ROOT@
ifdef NATIVE_ROOT_PATH
ifeq ($(findstring osx,@ARCH@),osx)
NATIVE_ARCH=$(shell echo $(CXXFLAGS) | grep x86_64 >/dev/null && echo -m64 || echo -m32)
endif
CXXFLAGS+= -I$(NATIVE_ROOT_PATH)/include
LIBS    += -L$(NATIVE_ROOT_PATH)/lib
endif
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)
	g++ $(DEFINES) $(NATIVE_ARCH) $(CXXFLAGS) $(SRCS) $(LIBS) -o $(TARGET)
clean:
	rm -f $(TARGET)
else
include @abs_top_srcdir@/Makefile.include

$(TARGET): $(SRCS)
	$(CXX) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(SRCS) $(LDFLAGS) $(LIBS) -o $(TARGET)
endif