#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# With modern GCC (C23 default) a plain non-static 'inline' function no longer
# gets an out-of-line definition emitted, and without optimization (-O2) it is
# not inlined either, so the inline helpers in src/xo-shapes.c are left
# undefined at link time. Restoring GNU89 inline semantics makes GCC emit the
# out-of-line definitions as well, without touching the upstream sources.
export DEB_CFLAGS_MAINT_APPEND = -fgnu89-inline

%:
	dh $@

# Add extra target so desktop crud is also installed.
# Remove autotools-installed HTML manual; is installed directly from source tree.
# Remove /usr/share/mimelnk/ files, these are cruft left from KDE3.
override_dh_auto_install:
	dh_auto_install -- desktop-install
	-rm --verbose -rf $(CURDIR)/debian/xournal/usr/share/xournal/html-doc
	-rm --verbose -rf $(CURDIR)/debian/xournal/usr/share/mimelnk
