#!/usr/bin/make -f # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export DEB_CFLAGS_MAINT_STRIP = -g export DEB_CXXFLAGS_MAINT_STRIP = -g export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed # only enable debugging symbols on archs supporting -gstabs DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), amd64 i386 powerpc s390x)) export DEB_CFLAGS_MAINT_APPEND = -gstabs export DEB_CXXFLAGS_MAINT_APPEND = -gstabs endif ifneq (,$(filter $(DEB_HOST_ARCH),alpha)) export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-relax endif CFLAGS := $(shell dpkg-buildflags --get CFLAGS) CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) QMAKE_ARGS := "--qmakearg=\"QMAKE_CFLAGS_RELEASE=$(CFLAGS) $(CPPFLAGS)\"" QMAKE_ARGS += "--qmakearg=\"QMAKE_CXXFLAGS_RELEASE=$(CXXFLAGS) $(CPPFLAGS)\"" QMAKE_ARGS += "--qmakearg=\"QMAKE_LFLAGS_RELEASE=$(LDFLAGS)\"" # Respect the number of parallel jobs ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) MAKE_ARGS := --makeargs="-j$(NUMJOBS)" endif export QMAKEPATH=Tools/qmake export QTDIR=/usr DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) %: dh $@ --parallel --fail-missing --dbg-package=libqtwebkit4-dbg --with pkgkde_symbolshelper override_dh_auto_clean: rm -rf WebKitBuild find . -name *.pyc | xargs rm -vf override_dh_auto_configure: true override_dh_auto_build: #disable JIT assembler on archs where it doesn't compile #disable WTF_USE_3D_GRAPHICS on ARM where it doesn't compile #disable forcing SSE2 on all other platforms ifneq (,$(filter alpha arm64 armel hppa m68k mips mips64 mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390x sh4 sparc64 x32,$(DEB_HOST_ARCH))) ./Tools/Scripts/build-webkit --qt DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0 $(QMAKE_ARGS) $(MAKE_ARGS) else ifeq ($(DEB_HOST_ARCH),armhf) ./Tools/Scripts/build-webkit --qt DEFINES+=WTF_USE_3D_GRAPHICS=0 DEFINES+=ENABLE_JIT=0 DEFINES+=ENABLE_YARR_JIT=0 DEFINES+=ENABLE_ASSEMBLER=0 $(QMAKE_ARGS) $(MAKE_ARGS) else ./Tools/Scripts/build-webkit --qt $(QMAKE_ARGS) $(MAKE_ARGS) --no-force-sse2 endif override_dh_auto_install: dh_auto_install -- INSTALL_ROOT=$(CURDIR)/debian/tmp -C WebKitBuild/Release prune-nonfree: rm -fv ManualTests/plugins/test.swf rm -fv ManualTests/plugins/timeout-dialog-displayed-over-navigation.swf rm -fv ManualTests/resources/spinbox.swf rm -fv Tools/TestResultServer/static-dashboards/dygraph-combined.js