File: rules

package info (click to toggle)
alure 1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 408 kB
  • ctags: 362
  • sloc: cpp: 1,794; ansic: 372; sh: 48; makefile: 32
file content (46 lines) | stat: -rwxr-xr-x 1,123 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
#!/usr/bin/make -f

# Pass -Wall and some other compiler options we wish to use.
CFLAGS = "-Wall $(DEB_CFLAGS)"
CXXFLAGS = "-Wall $(DEB_CXXFLAGS)"

# nostrip option implies noopt
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
   TYPE=RelWithDebInfo
else
   TYPE=Debug
endif

# Use this variable to allow options passed to cmake to be overridable
DEB_CMAKE_OPTIONS ?= -DCMAKE_VERBOSE_MAKEFILE=ON \
		-DCMAKE_BUILD_TYPE=$(TYPE) \
		-DCMAKE_INSTALL_PREFIX="/usr" \
		-DCMAKE_C_FLAGS="$(CFLAGS)" \
		-DCMAKE_CXX_FLAGS="$(CXXFLAGS)" \
		-DCMAKE_CXX_COMPILER="g++"

%:
	dh --with quilt $@

override_dh_auto_clean:
	rm -rf build/*
	rm -rf build-static

override_dh_auto_configure:
	cd build && cmake $(DEB_CMAKE_OPTIONS) ..
	mkdir build-static
	cd build-static && cmake $(DEB_CMAKE_OPTIONS) \
		-DNO_SHARED="ON" ..

override_dh_auto_build:
	$(MAKE) --directory=build
	$(MAKE) --directory=build-static

override_dh_auto_install:
	$(MAKE) --directory=build install DESTDIR=$(CURDIR)/debian/tmp

override_dh_strip:
	dh_strip --dbg-package=libalure1-dbg

get-orig-source:
	$(dir $_)alure-get-orig-source --remove-upstream-tarball