Initial commit
[profile/ivi/simulator-opengl.git] / backrules
1 #!/usr/bin/make -f
2
3 # Uncomment this to turn on verbose mode.
4 #export DH_VERBOSE=1
5
6 CFLAGS ?= -Wall -g
7 LDFLAGS ?= 
8 PREFIX ?= /usr
9 DESTDIR=$(CURDIR)/debian/tmp$(PREFIX)
10 DATADIR ?= /opt
11
12 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
13         CFLAGS += -O0
14 else
15         CFLAGS += -O2
16 endif
17
18 #LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
19
20 configure: configure-stamp
21 configure-stamp:
22         dh_testdir
23         # Add here commands to configure the package.
24         touch configure-stamp
25
26
27 build: build-stamp
28
29 build-stamp: configure-stamp 
30         dh_testdir
31
32         # Add here commands to compile the package.
33         #$(MAKE)
34
35         touch $@
36
37 clean:
38         dh_testdir
39         dh_testroot
40         rm -f build-stamp configure-stamp
41
42         # Add here commands to clean up after the build process.
43         #-$(MAKE) clean
44
45         dh_clean 
46
47 install: build
48         dh_testdir
49         dh_testroot
50         dh_clean -k 
51         dh_installdirs
52
53         # Add here commands to install the package into debian/tmp.
54         mkdir -p $(CURDIR)/debian/tmp
55         mkdir -p $(CURDIR)/debian/tmp/usr/include
56         mkdir -p $(CURDIR)/debian/tmp/usr/lib
57         cp -afRl lib/* $(CURDIR)/debian/tmp/usr/lib/.
58         #cp -afRl include/* $(CURDIR)/debian/tmp/usr/include/.
59         cp -a include/EGL   $(DESTDIR)/include/.
60         cp -a include/GLES  $(DESTDIR)/include/.
61         cp -a include/GLES2 $(DESTDIR)/include/.
62         cp -a include/GL   $(DESTDIR)/include/.
63
64         #cp -fRl lib/* $(CURDIR)/debian/tmp/usr/lib
65         #cp -fRl include/* $(CURDIR)/debian/tmp/usr/include
66         #$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
67
68 # Build architecture-independent files here.
69 binary-indep: build install
70 # We have nothing to do by default.
71
72 # Build architecture-dependent files here.
73 binary-arch: build install
74         dh_testdir
75         dh_testroot
76         dh_installchangelogs 
77         dh_installdocs
78         dh_installexamples
79         dh_install --sourcedir=debian/tmp
80 #       dh_installmenu
81 #       dh_installdebconf       
82 #       dh_installlogrotate
83 #       dh_installemacsen
84 #       dh_installpam
85 #       dh_installmime
86 #       dh_python
87 #       dh_installinit
88 #       dh_installcron
89 #       dh_installinfo
90         dh_installman
91         dh_link
92         dh_strip
93         dh_compress
94         dh_fixperms
95 #       dh_perl
96         dh_makeshlibs
97         dh_installdeb
98         dh_shlibdeps
99         dh_gencontrol
100         dh_md5sums
101         dh_builddeb
102
103 binary: binary-indep binary-arch
104 .PHONY: build clean binary-indep binary-arch binary install configure