#!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk prefix=/usr package = mingw-w64-libpng target = x86_64-w64-mingw32 prefix = /usr/$(target) docdir = debian/$(package)/usr/share/doc/$(package) builddir = build DESTDIR = $(shell /bin/pwd)/debian/$(package) package32 = mingw-w32-libpng target32 = i686-w64-mingw32 prefix32 = /usr/$(target32) docdir32 = debian/$(package32)/usr/share/doc/$(package32) builddir32 = build32 DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) package32o = mingw-w32-i586-libpng target32o = i586-w64-mingw32 prefix32o = /usr/$(target32o) docdir32o = debian/$(package32)/usr/share/doc/$(package32o) builddir32o = build32o DESTDIR32o = $(shell /bin/pwd)/debian/$(package32o) DEB_INSTALL_DOCS_ALL := src/README src/LICENSE DEB_SHLIBDEPS_INCLUDE := DEB_DH_ALWAYS_EXCLUDE := .svn # do not strip anything. # call 'strip' on a mingw lib*.a file causes the ranlib information to # be discarded rendering the libraries useless. DEB_DH_STRIP_ARGS := -Xlib INSTALL_PROGRAM = install common-build-arch:: rm -rf $(builddir) mkdir $(builddir) cd $(builddir) && CC=$(target)-gcc CXX=$(target)-g++ ../src/configure --host=$(target) --prefix=$(prefix) --without-libpng-compat cd $(builddir) && make all rm -rf $(builddir32) mkdir $(builddir32) cd $(builddir32) && CC=$(target32)-gcc CXX=$(target32)-g++ ../src/configure --host=$(target32) --prefix=$(prefix32) --without-libpng-compat cd $(builddir32) && make all rm -rf $(builddir32o) mkdir $(builddir32o) cd $(builddir32o) && CC='$(target32)-gcc -march=i586' CXX='$(target32)-g++ -march=i586' ../src/configure --host=$(target32o) --prefix=$(prefix32o) --without-libpng-compat cd $(builddir32o) && make all touch common-build-arch clean:: rm -f compile common-install-arch common-build-arch rm -rf *~ debian/$(package) debian/$(package32) debian/*~ debian/files* debian/substvars debian/compat rm -rf $(builddir) rm -rf $(builddir32) rm -rf $(builddir32o) # # install and additional compatibility symlink libpng.dll.a -> libpng12.dll.a # This assures, that ppackages linking with -lpng are using the DLL version # of libpng and correctly depend on libpng12.dll # common-install-arch:: rm -rf debian/$(package) mkdir debian/$(package) cd $(builddir) && make DESTDIR=$(DESTDIR) install cd debian/$(package)$(prefix)/lib && ln -s libpng12.dll.a libpng.dll.a rm -rf debian/$(package32) mkdir debian/$(package32) cd $(builddir32) && make DESTDIR=$(DESTDIR32) install cd debian/$(package32)$(prefix32)/lib && ln -s libpng12.dll.a libpng.dll.a rm -rf debian/$(package32o) mkdir debian/$(package32o) cd $(builddir32o) && make DESTDIR=$(DESTDIR32o) install cd debian/$(package32o)$(prefix32o)/lib && ln -s libpng12.dll.a libpng.dll.a touch common-install-arch