add unfinished bmpImage implementation
[openc2e.git] / debian / rules
blob66ed27dcd6cb48b1ab50eefc127a4bae24b611b9
1 #!/usr/bin/make -f
2 # -*- makefile -*-
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.
10 #export DH_VERBOSE=1
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'
20 endif
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)))
32 BUILD_TYPE = Debug
33 else
34 BUILD_TYPE = RelWithDebInfo
35 endif
36 CMAKE_FLAGS += -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
38 configure: configure-stamp
39 configure-stamp:
40 dh_testdir
41 mkdir $(CURDIR)/build
42 cd $(CURDIR)/build; cmake $(CMAKE_FLAGS) ..
44 touch configure-stamp
47 build: build-stamp
49 build-stamp: configure-stamp
50 dh_testdir
52 cd $(CURDIR)/build; make
54 touch build-stamp
56 clean:
57 dh_testdir
58 dh_testroot
59 rm -f build-stamp configure-stamp
61 rm -rf build
63 dh_clean
65 install: build
66 dh_testdir
67 dh_testroot
68 dh_clean -k
69 dh_installdirs
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
78 dh_testdir
79 dh_testroot
80 dh_installchangelogs
81 dh_installdocs
82 dh_installexamples
83 dh_install --fail-missing --sourcedir=debian/tmp
84 dh_installman build/openc2e.6
85 dh_link
86 dh_strip --dbg-package=openc2e-dbg
87 dh_compress -X.css -X.html
88 dh_fixperms
89 dh_installdeb
90 dh_shlibdeps
91 dh_gencontrol
92 dh_md5sums
93 dh_builddeb
95 binary: binary-indep binary-arch
96 .PHONY: build clean binary-indep binary-arch binary install configure