summaryrefslogtreecommitdiff
path: root/Build/source/libs/zziplib/zziplib-src/SDL/Makefile.am
blob: c66d443a5672f2029fbc6caf0a4fa060065bb0b8 (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
55
56
57
AUTOMAKE_OPTIONS = 1.4 foreign
AUTOTOOL_VERSION=autoconf-2.52 automake-1.5 libtool-1.4.2

zzipsdldir = ${includedir}/SDL_rwops_zzip
zzipsdl_DATA = SDL_rwops_zzip.c SDL_rwops_zzip.h

EXTRA_DIST = $(sdl_DATA)
check_PROGRAMS = zzcatsdl

zzcatsdl_SOURCES = SDL_rwops_zzcat.c SDL_rwops_zzip.c
ZZIP_CFLAGS= `export PKG_CONFIG_PATH=../zzip; $(PKG_CONFIG) zziplib --cflags` 
ZZIP_LIBS= `export PKG_CONFIG_PATH=../zzip; $(PKG_CONFIG) zziplib --libs`
SDL_CFLAGS= `export PKG_CONFIG_PATH=.; $(PKG_CONFIG) sdl --cflags` 
SDL_LIBS= `export PKG_CONFIG_PATH=.; $(PKG_CONFIG) sdl --libs`
CFLAGS= -I$(srcdir) $(ZZIP_CFLAGS) $(SDL_CFLAGS)
LIBS= $(ZZIP_LIBS) $(SDL_LIBS)

default: test-sdl
*.$(OBJEXT): ../zzip/zziplib.pc
../zzip/zziplib.pc : ../zzip/Makefile
	cd ../zzip && $(MAKE) zziplib.pc

test.zip : @top_srcdir@/test/test.zip
	$(LN_S) $? $@
testsdl test-sdl : test.zip zzcatsdl$(EXEEXT)
	./zzcatsdl$(EXEEXT) test/README > test.out
	diff -q @top_srcdir@/README test.out && rm test.out

all: @SDL_GENERATE@
sdl : all
install-sdl : install-data # and not the binary

CLEANFILES = *.pc *.omf
# ----------------------------------------------------------------------
# we do not install a library, so this about equivalent to some SDL.pc
pkgconfigdir=$(libdir)/pkgconfig
pkgconfig_HEADERS= SDL_rwops_zzip.pc
ERRNULL= 2>/dev/null

SDL_rwops_zzip.pc : Makefile
	@ echo 'prefix=$(prefix)' >$@
	@ echo 'zzipsdldir=$(zzipsdldir)' >>$@
	@ echo " " >>$@
	@ echo "Name: SDL_rwops_zzip" >>$@
	@ echo "Version: $(VERSION)" >>$@
	@ echo "Description: SDL_rwops for ZZipLib" >>$@
	echo 'Requires: sdl, zziplib' >>$@
	echo 'Cflags: -I$${zzipsdldir}' >>$@

sdl-pc : sdl-uninstalled.pc
sdl-uninstalled.pc : Makefile
	@ echo "prefix=`sdl-config --prefix`" >$@
	@ echo "Name: sdl" >>$@
	@ echo "Version: `sdl-config --version`" >>$@
	@ echo "Description: sdl - Simple DirectMedia Layer" >>$@
	echo "Libs: `sdl-config --libs`" >> $@
	echo "Cflags: `sdl-config --cflags`" >>$@