#!/usr/bin/make -f DEB_SRCDIR = BasiliskII/src/Unix DEB_BUILDDIR = build DEB_MAKE_FLAVORS = nojit # add JIT compiler when supported DEB_MAKE_FLAVORS += $(if $(filter amd64 i386,$(DEB_HOST_ARCH)),jit) DEB_AUTO_UPDATE_ACLOCAL = , DEB_ACLOCAL_ARGS = -I m4 DEB_AUTO_UPDATE_AUTOHEADER = 2.68 DEB_AUTO_UPDATE_AUTOCONF = 2.68 include /usr/share/cdbs/1/class/autotools.mk include /usr/share/cdbs/1/rules/debhelper.mk DEB_CONFIGURE_USER_FLAGS = --disable-rpath # SDL allows use of pulseaudio (and pipewire) without gone libesd headers DEB_CONFIGURE_USER_FLAGS = --enable-sdl-video --enable-sdl-audio --with-sdl2 DEB_CONFIGURE_USER_FLAGS += $(if $(filter debug,$(DEB_BUILD_OPTIONS)),,--without-mon) DEB_CONFIGURE_FLAGS_jit = --enable-jit-compiler DEB_MAKE_EXTRA_ARGS = "APP_FLAVOR=$(cdbs_make_curflavor)" DEB_MAKE_DESTDIRSKEL = $(CURDIR)/debian/tmp-@FLAVOR@ # Suppress excess and seemingly non-fatal warnings # * Upstream included -fno-merge-constants but seems unneeded warning-flags = -Wno-unused-variable -Wno-unused-label -Wno-unused-function -Wno-missing-braces -Wno-parentheses includedirs = -I$(CURDIR)/$(DEB_SRCDIR) CFLAGS += $(warning-flags) $(includedirs) CXXFLAGS += $(warning-flags) $(includedirs) DEB_INSTALL_DOCS_ALL += BasiliskII/TECH DEB_INSTALL_CHANGELOGS_ALL = debian/ChangeLog.git DEB_INSTALL_MANPAGES_ALL = debian/tmp-nojit/usr/share/man/man1/BasiliskII-nojit.1 # Add jit flavour files when compiled DEB_INSTALL_MANPAGES_ALL += $(if $(filter jit,$(DEB_MAKE_FLAVORS)),debian/tmp-jit/usr/share/man/man1/BasiliskII-jit.1) DEB_DH_INSTALL_ARGS_ALL = $(if $(filter jit,$(DEB_MAKE_FLAVORS)),debian/tmp-jit/usr/bin/BasiliskII-jit usr/bin) DEB_INSTALL_EXAMPLES_basilisk2 = $(DEB_SRCDIR)/Linux/* $(DEB_SRCDIR)/tunconfig binary-install/basilisk2:: dh_install debian/basilisk2.desktop usr/share/applications dh_install debian/basilisk2.xpm usr/share/pixmaps # tunconfig will be installed as example file only binary-post-install/basilisk2:: rm -f debian/$(cdbs_curpkg)/usr/share/BasiliskII/tunconfig clean:: rm -fr $(DEB_MAKE_FLAVORS:%=debian/tmp-%) build rm -f $(addprefix $(DEB_SRCDIR),/aclocal.m4 /config.h.in /configure /tinyxml2.*)