3 # Sample debian/rules that uses debhelper.
4 # This file was originally written by Joey Hess and Craig Small.
5 # As a special exception, when this file is copied by dh-make into a
6 # dh-make output file, you may use that output file without restriction.
7 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 # Uncomment this to turn on verbose mode.
14 CMAKE_FLAGS
+= -DCMAKE_EXE_LINKER_FLAGS
:STRING
=-Wl
,--as-needed
16 ## Since debian does not support plain 386 anymore, try to get a bit of an edge here
17 ifeq (i386
,$(DEB_BUILD_ARCH
))
18 CMAKE_FLAGS
+= -DCMAKE_CXX_FLAGS
:STRING
='-g -march=i486 -O2'
19 CMAKE_FLAGS
+= -DCMAKE_C_FLAGS
:STRING
='-g -march=i486 -O2'
22 CMAKE_FLAGS
+= -DCMAKE_CXX_FLAGS_RELEASE
:STRING
='-O2 -NDEBUG'
23 CMAKE_FLAGS
+= -DCMAKE_C_FLAGS_RELEASE
:STRING
='-O2 -NDEBUG'
25 CMAKE_FLAGS
+= -DCMAKE_CXX_FLAGS_RELWITHDEBINFO
:STRING
='-O2 -ggdb3'
26 CMAKE_FLAGS
+= -DCMAKE_C_FLAGS_RELWITHDEBINFO
:STRING
='-O2 -ggdb3'
28 CMAKE_FLAGS
+= -DCMAKE_CXX_FLAGS_DEBUG
:STRING
='-O2 -ggdb3'
29 CMAKE_FLAGS
+= -DCMAKE_C_FLAGS_DEBUG
:STRING
='-O2 -ggdb3'
31 ifneq (,$(findstring noopt
,$(DEB_BUILD_OPTIONS
)))
34 BUILD_TYPE
= RelWithDebInfo
36 CMAKE_FLAGS
+= -DCMAKE_BUILD_TYPE
:STRING
=$(BUILD_TYPE
)
38 configure
: configure-stamp
42 cd
$(CURDIR
)/build
; cmake
$(CMAKE_FLAGS
) ..
49 build-stamp
: configure-stamp
52 cd
$(CURDIR
)/build
; make
59 rm -f build-stamp configure-stamp
71 install -d debian
/tmp
/usr
/games
72 install build
/openc2e debian
/tmp
/usr
/games
75 binary-indep
: build
install
77 binary-arch
: build
install
83 dh_install
--fail-missing
--sourcedir
=debian
/tmp
84 dh_installman build
/openc2e
.6
86 dh_strip
--dbg-package
=openc2e-dbg
87 dh_compress
-X.css
-X.html
95 binary
: binary-indep binary-arch
96 .PHONY
: build
clean binary-indep binary-arch binary
install configure