]> git.sur5r.net Git - iec16022/blob - debian/rules
Merge commit 'upstream/0.2.3'
[iec16022] / debian / rules
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 # Sample debian/rules that uses debhelper.
4 #
5 # This file was originally written by Joey Hess and Craig Small.
6 # As a special exception, when this file is copied by dh-make into a
7 # dh-make output file, you may use that output file without restriction.
8 # This special exception was added by Craig Small in version 0.37 of dh-make.
9 #
10 # Modified to make a template file for a multi-binary package with separated
11 # build-arch and build-indep targets  by Bill Allombert 2001
12
13 include /usr/share/dpatch/dpatch.make
14
15 # Uncomment this to turn on verbose mode.
16 #export DH_VERBOSE=1
17
18 # This has to be exported to make some magic below work.
19 export DH_OPTIONS
20
21
22
23 CFLAGS = -Wall -g
24
25 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
26         CFLAGS += -O0
27 else
28         CFLAGS += -O2
29 endif
30
31 configure: configure-stamp
32 configure-stamp: patch
33         dh_testdir
34
35         touch configure-stamp
36
37
38 #Architecture 
39 build: build-arch
40
41 build-arch: build-arch-stamp
42 build-arch-stamp: configure
43         $(CC) -o iec16022 iec16022.c -DLIB image.c reedsol.c iec16022ecc200.c -lz -lpopt
44         touch build-arch-stamp
45
46 build-indep: build-indep-stamp
47 build-indep-stamp: configure
48         touch build-indep-stamp
49
50 clean: clean-patched unpatch
51 clean-patched:
52         dh_testdir
53         dh_testroot
54         rm -f build-arch-stamp build-indep-stamp configure-stamp
55
56         -rm iec16022
57
58         dh_clean 
59
60 install: install-arch
61 install-indep:
62         dh_testdir
63         dh_testroot
64         dh_clean -k -i 
65         dh_installdirs -i
66
67         # Add here commands to install the indep part of the package into
68         # debian/<package>-doc.
69         #INSTALLDOC#
70
71         dh_install -i
72
73 install-arch:
74         dh_testdir
75         dh_testroot
76         dh_clean -k -s 
77         dh_installdirs -s
78
79         # Add here commands to install the arch part of the package into 
80         # debian/tmp.
81         #$(MAKE) install DESTDIR=$(CURDIR)/debian/projectm
82
83         dh_install -s
84 # Must not depend on anything. This is to be called by
85 # binary-arch/binary-indep
86 # in another 'make' thread.
87 binary-common:
88         dh_testdir
89         dh_testroot
90         dh_installchangelogs CHANGELOG
91         dh_installdocs
92         #dh_installexamples
93         dh_installman
94         dh_link
95         dh_strip
96         dh_compress 
97         dh_fixperms
98         dh_makeshlibs
99         dh_installdeb
100         dh_shlibdeps
101         dh_gencontrol
102         dh_md5sums
103         dh_builddeb
104 # Build architecture independant packages using the common target.
105 binary-indep: build-indep install-indep
106         $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
107
108 # Build architecture dependant packages using the common target.
109 binary-arch: build-arch install-arch
110         $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
111
112 binary: binary-arch
113 .PHONY: build clean binary install configure
114