aboutsummaryrefslogtreecommitdiff
path: root/lib/cximage-6.0/Makefile.in
blob: 9981e05662e1ade7e9670d3be062acd1914d90b9 (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
53
54

ARCH=@ARCH@
SO=ImageLib-$(ARCH).so
ARCHIVE=$(SO:.so=.a)
SYSDIR=../../system
SLIB=$(SYSDIR)/$(SO)
DIRS=CxImage raw jbig
SLIBS=CxImage/cximage.a raw/raw.a jbig/jbig.a

ifeq ($(findstring osx,$(ARCH)), osx)
	export ARCH
	DIRS+=jasper
	SLIBS+=jasper/jasper.a
endif

.PHONY: compile

$(SLIB): $(SLIBS)
ifeq ($(findstring osx,$(ARCH)), osx)
	$(CXX) $(LDFLAGS) -Wl,-alias_list,@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper_mach_alias \
	-bundle -undefined dynamic_lookup -read_only_relocs suppress -lpng -ljpeg -ltiff -lz -o $@ \
	@abs_top_srcdir@/xbmc/cores/DllLoader/exports/wrapper.o CxImage/*.o jasper/*/*.o jbig/*.o raw/*.o
else
	$(CXX) $(CFLAGS) $(LDFLAGS) -shared -o $(SLIB) -Wl,--whole-archive $(SLIBS) \
		-Wl,--no-whole-archive -lpng -ljasper -ljpeg -ltiff -lz -Wl,--unresolved-symbols=ignore-all \
		`cat ../../xbmc/cores/DllLoader/exports/wrapper.def` \
		../../xbmc/cores/DllLoader/exports/wrapper.o
endif

$(SLIBS): compile 

CxImage/cximage.a:
	$(MAKE) -C CxImage ARCH=$(ARCH)

jbig/jbig.a:
	$(MAKE) -C jbig

raw/raw.a:
	$(MAKE) -C raw

zlib/libz.a:
	$(MAKE) -C zlib

jasper/jasper.a:
	$(MAKE) -C jasper

jpeg/jpeg.a:
	$(MAKE) -C jpeg

tiff/tiff.a:
	$(MAKE) -C tiff

-include ../../Makefile.include