File: rules

package info (click to toggle)
basilisk2 0.9.20240402%2Bdfsg-1
  • links: PTS, VCS
  • area: contrib
  • in suites: trixie
  • size: 15,980 kB
  • sloc: cpp: 219,080; ansic: 48,228; sh: 3,713; asm: 1,904; makefile: 1,317; objc: 745; perl: 198
file content (55 lines) | stat: -rwxr-xr-x 2,144 bytes parent folder | download
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
#!/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)