#!/usr/bin/make -f prefix=/usr package = mingw-w64-libjpeg devpackage = mingw-w64-libjpeg-dev 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-libjpeg devpackage32 = mingw-w32-libjpeg-dev target32 = i686-w64-mingw32 prefix32 = /usr/$(target32) docdir32 = debian/$(package32)/usr/share/doc/$(package32) builddir32 = build32 DESTDIR32 = $(shell /bin/pwd)/debian/$(package32) DEB_INSTALL_DOCS_ALL := src/README DEB_SHLIBDEPS_INCLUDE := DEB_DH_ALWAYS_EXCLUDE := .svn %: dh $@ # 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 override_dh_strip: override_dh_shlibdeps: export DEB_CFLAGS_MAINT_SET = -O2 -Wall export DEB_LDFLAGS_MAINT_SET = build-indep: common-build-indep install-indep: common-install-indep INSTALL_PROGRAM = install common-build-indep:: rm -rf $(builddir) mkdir $(builddir) cd $(builddir) && CC=$(target)-gcc CXX=$(target)-g++ ../src/configure --host=$(target) --prefix=$(prefix) --enable-shared --disable-static cd $(builddir) && make all rm -rf $(builddir32) mkdir $(builddir32) cd $(builddir32) && CC=$(target32)-gcc CXX=$(target32)-g++ ../src/configure --host=$(target32) --prefix=$(prefix32) --enable-shared --disable-static cd $(builddir32) && make all touch common-build-indep clean:: rm -f compile common-install-indep common-build-indep rm -rf *~ debian/$(package) debian/$(devpackage) debian/$(package32) debian/$(devpackage32) debian/*~ debian/files* debian/substvars debian/devhost.txt.gz debian/*.substvars debian/*.debhelper.log rm -rf $(builddir) rm -rf $(builddir32) # # info pages, locale data and static libraries may conflict with # already installed binutils packages. # common-install-indep:: rm -rf debian/$(package) rm -rf debian/$(devpackage) mkdir debian/$(package) cd $(builddir) && make DESTDIR=$(DESTDIR) install mkdir -p debian/$(devpackage)/usr/$(target) mv debian/$(package)/usr/$(target)/include debian/$(devpackage)/usr/$(target) mv debian/$(package)/usr/$(target)/lib debian/$(devpackage)/usr/$(target) rm -rf debian/$(package)/usr/$(target)/share rm -rf debian/$(package32) rm -rf debian/$(devpackage32) mkdir debian/$(package32) cd $(builddir32) && make DESTDIR=$(DESTDIR32) install mkdir -p debian/$(devpackage32)/usr/$(target32) mv debian/$(package32)/usr/$(target32)/include debian/$(devpackage32)/usr/$(target32) mv debian/$(package32)/usr/$(target32)/lib debian/$(devpackage32)/usr/$(target32) rm -rf debian/$(package32)/usr/$(target32)/share touch common-install-indep