aboutsummaryrefslogtreecommitdiff
path: root/lib/libsquish/Makefile.in
blob: 34f93bdeeadb9a27e7650402010802eba11aadff (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
ARCH=@ARCH@

SRCS= \
  alpha.cpp \
  clusterfit.cpp \
  colourblock.cpp \
  colourfit.cpp \
  colourset.cpp \
  maths.cpp \
  rangefit.cpp \
  singlecolourfit.cpp \
  squish.cpp

CXXFLAGS+=-I.

LIB=libsquish.a

ifeq (@USE_TEXTUREPACKER_NATIVE@,1)
NATIVE_LIB=libsquish-native.so
CLEAN_FILES+=$(NATIVE_LIB)

ifeq ($(findstring Darwin,$(shell uname -s)),Darwin)
NATIVE_ARCH=@DARWIN_NATIVE_ARCH@
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 Darwin,$(shell uname -s)),Darwin)
	g++ $(NATIVE_ARCH) -I. $(SRCS) -dynamiclib -install_name `pwd`/libsquish-native.so -o $@
else
	g++ -I. $(SRCS) -shared -fPIC -Wl,-soname,`pwd`/libsquish-native.so -o $@
endif
endif

include ../../Makefile.include
-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))