3 # Uncomment this to turn on verbose mode.
13 CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
15 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
21 LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs
23 configure: configure-stamp
26 # Add here commands to configure the package.
27 mkdir -p $(CMAKE_BUILD_DIR) && \
28 cd $(CMAKE_BUILD_DIR) && \
29 CFLAGS="$(CFLAGS) -fpie" LDFLAGS="$(LDFLAGS) -pie" \
30 cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DPLUGIN_INSTALL_PREFIX=$(PLUGIN_PREFIX)
36 build-stamp: configure-stamp
39 # Add here commands to compile the package.
40 cd $(CMAKE_BUILD_DIR) && $(MAKE)
42 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
43 cat $$f > $${f%.in}; \
44 sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
45 sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
46 sed -i -e "s#@PLUGIN_PREFIX@#$(PLUGIN_PREFIX)#g" $${f%.in}; \
54 rm -f build-stamp configure-stamp
56 # Add here commands to clean up after the build process.
57 -rm -rf $(CMAKE_BUILD_DIR)
59 for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
70 # Add here commands to install the package into debian/wavplayer.
71 cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
74 mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc3.d
75 mkdir -p $(CURDIR)/debian/tmp/etc/rc.d/rc5.d
76 ln -s ../init.d/bluetooth-address $(CURDIR)/debian/tmp/etc/rc.d/rc3.d/S60bluetooth-address
77 ln -s ../init.d/bluetooth-address $(CURDIR)/debian/tmp/etc/rc.d/rc5.d/S60bluetooth-address
79 # Build architecture-independent files here.
80 binary-indep: build install
81 # We have nothing to do by default.
83 # Build architecture-dependent files here.
84 binary-arch: build install
90 dh_install --sourcedir=debian/tmp
103 # dh_strip --dbg-package=bluetooth-tools-dbg
114 binary: binary-indep binary-arch
115 .PHONY: build clean binary-indep binary-arch binary install configure