#!/usr/bin/make -f #export DH_VERBOSE=1 export DEB_CFLAGS_MAINT_APPEND := -pipe -Wall # bug #715461, provide default soundfont paths export DEB_CPPFLAGS_MAINT_APPEND := -DMIX_INIT_SOUNDFONT_PATHS=\"/usr/share/sounds/sf3/default-GM.sf3\" export DEB_LDFLAGS_MAINT_APPEND := -Wl,--no-undefined -Wl,-Bsymbolic -Wl,--as-needed # ============================================================================== # ARMv5 (Brainux) Switchable Optimization Template for Debian Ryles file. # Please add this below `#!/usr/bin/make -f`. # ============================================================================== # ------------------------------------------------------------------------------ # [1] Basic flags (base optimizations applied even during test builds) # ------------------------------------------------------------------------------ export COMMON_APPEND = -march=armv5tej -mtune=arm926ej-s -marm export COMMON_APPEND += -O3 -fomit-frame-pointer -fno-strict-aliasing -fno-tree-vectorize -fno-aggressive-loop-optimizations -fno-strict-overflow export COMMON_APPEND += -mfloat-abi=soft -ffast-math -fno-finite-math-only -ffunction-sections -fdata-sections -falign-functions=2 export COMMON_APPEND += MY_CFLAGS_BASE = $(COMMON_APPEND) -Wno-error=implicit-function-declaration -Wno-error=int-conversion export DEB_CXXFLAGS_MAINT_APPEND += $(COMMON_APPEND) -fpermissive export DEB_LDFLAGS_MAINT_APPEND += -lm -Wl,--gc-sections -Wl,-s -Wl,--as-needed export DEB_BUILD_MAINT_OPTIONS += hardening=+bindnow # ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------ # [2] Ultra-powerful finalization flag (Resource-intensive; for LTO production use) # When performing a build check (test), # please comment out the six lines below by adding a "#" at the beginning of each. # When enabling these lines (uncommenting), please execute the following command beforehand. # $ mkdir -p ~/target_tmp # ------------------------------------------------------------------------------ export TMPDIR =$(HOME)/target_tmp export TMP =$(HOME)/target_tmp export TEMP =$(HOME)/target_tmp export DEB_CXXFLAGS_MAINT_APPEND += -Wno-odr export DEB_LDFLAGS_MAINT_APPEND += -flto-partition=max export DEB_BUILD_MAINT_OPTIONS += optimize=+lto # ------------------------------------------------------------------------------ # ============================================================================== # Please add this below `include /usr/share/dpkg/default.mk`. # ============================================================================== # ------------------------------------------------------------------------------ # [3] Final assignment (*Must be placed at the very end) # ------------------------------------------------------------------------------ export DEB_CFLAGS_MAINT_APPEND += $(MY_CFLAGS_BASE) # ------------------------------------------------------------------------------ # [4] Compatibility settings for building legacy source code with GCC 14+ # - Forces C11/C++11 standards to allow old syntax stricter in newer compilers. # - Suppresses C++20-specific template/constructor warnings and errors. # ------------------------------------------------------------------------------ #export DEB_CFLAGS_MAINT_APPEND += -std=gnu11 #export DEB_CXXFLAGS_MAINT_APPEND += -std=gnu++11 -Wno-template-id-cdtor # ------------------------------------------------------------------------------ # export variables for autoreconf export AUTOMAKE := automake --foreign # enable external music player confflags = --enable-music-cmd # explicitly enable/disable all supported sound, using libmad instead of # libsmpeg for mp3 (it's much more popular, and smpeg is unmaintained) confflags += --enable-music-wave confflags += --enable-music-mod confflags += --enable-music-ogg confflags += --disable-music-mp3 confflags += --enable-music-mp3-mad-gpl confflags += --enable-music-ogg-tremor confflags += --disable-music-timidity-midi confflags += --disable-music-native-midi confflags += --disable-music-fluidsynth # Explicitly state what we use #confflags += --enable-music-timidity-midi #confflags += --enable-music-native-midi # mafm 20111203: removed the "disable shared" support from previous versions, I # couldn't find any reason for it in the changelog # # mafm 20111204: issue "disable-*-shared" flags for 'configure' again, otherwise # SDL_mixer library opens those libraries in a plugin-like way (with # SDL_LoadObject), and dpkg-shlibdeps doesn't seem to generate the needed # dependencies in the binary library package confflags += --disable-music-mod-shared confflags += --disable-music-ogg-shared confflags += --disable-music-mp3-shared confflags += --disable-music-flac-shared #confflags += --disable-music-fluidsynth-shared %: dh $@ --dbgsym-migration='libsdl-mixer1.2-dbg (<< 1.2.12-12~)' override_dh_auto_configure: dh_auto_configure -- $(confflags) execute_after_dh_auto_install: rm -f debian/tmp/usr/lib/*/libSDL_mixer.la override_dh_makeshlibs: dh_makeshlibs -- -c0