author | edouard |
Fri, 10 Sep 2010 13:44:06 +0200 | |
changeset 626 | 270b25cd9e8f |
parent 612 | fc3399727a06 |
permissions | -rwxr-xr-x |
346 | 1 |
#!/usr/bin/make -f |
2 |
# -*- makefile -*- |
|
3 |
||
4 |
# Uncomment this to turn on verbose mode. |
|
5 |
export DH_VERBOSE=1 |
|
6 |
||
7 |
# This has to be exported to make some magic below work. |
|
8 |
export DH_OPTIONS |
|
9 |
||
10 |
CFLAGS = -Wall -g |
|
11 |
||
12 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
|
13 |
CFLAGS += -O0 |
|
14 |
else |
|
15 |
CFLAGS += -O2 |
|
16 |
endif |
|
17 |
||
18 |
config.status: configure |
|
19 |
#### CONFIG.STATUS #### |
|
20 |
dh_testdir |
|
531 | 21 |
|
346 | 22 |
# Add here commands to configure the package. |
531 | 23 |
cp debian/control-$(shell echo $(CAN_INTERFACE)) debian/control; \ |
612 | 24 |
./configure --can=$(shell echo $(CAN_INTERFACE)) --prefix=/usr --wx=0 |
531 | 25 |
|
26 |
build: build-indep |
|
346 | 27 |
|
28 |
build-indep: build-indep-stamp |
|
531 | 29 |
|
346 | 30 |
build-indep-stamp: config.status |
31 |
#### BUILD-INDEP-STAMP #### |
|
32 |
# Add here commands to compile the indep part of the package. |
|
531 | 33 |
$(MAKE) |
34 |
||
35 |
clean: |
|
346 | 36 |
#### CLEAN #### |
37 |
dh_testdir |
|
38 |
dh_testroot |
|
531 | 39 |
rm -f build-indep-stamp #CONFIGURE-STAMP# |
346 | 40 |
|
41 |
# Add here commands to clean up after the build process. |
|
42 |
-$(MAKE) clean |
|
43 |
ifneq "$(wildcard /usr/share/misc/config.sub)" "" |
|
44 |
cp -f /usr/share/misc/config.sub config.sub |
|
45 |
endif |
|
46 |
ifneq "$(wildcard /usr/share/misc/config.guess)" "" |
|
47 |
cp -f /usr/share/misc/config.guess config.guess |
|
48 |
endif |
|
49 |
||
50 |
||
51 |
dh_clean |
|
52 |
||
53 |
install: install-indep install-arch |
|
54 |
install-indep: |
|
55 |
#### INSTALL-INDEP #### |
|
56 |
dh_testdir |
|
57 |
dh_testroot |
|
58 |
dh_clean -k -i |
|
59 |
dh_installdirs -i |
|
60 |
||
61 |
# Add here commands to install the indep part of the package into |
|
62 |
# debian/<package>-doc. |
|
531 | 63 |
$(MAKE) -C drivers PREFIX=$(CURDIR)/debian/canfestival/usr install |
64 |
$(MAKE) -C src PREFIX=$(CURDIR)/debian/canfestival/usr install |
|
65 |
$(MAKE) -C drivers PREFIX=$(CURDIR)/debian/canfestival/usr install |
|
66 |
$(MAKE) -C examples PREFIX=$(CURDIR)/debian/canfestival/usr install |
|
67 |
$(MAKE) -C objdictgen PREFIX=$(CURDIR)/debian/canfestival/usr/share/CanFestival-3 install |
|
68 |
||
69 |
mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/src |
|
70 |
mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/include |
|
71 |
mkdir -p $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/drivers/unix |
|
72 |
cp -a $(CURDIR)/debian/canfestival/usr/include/canfestival/* $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/include |
|
73 |
cp -a $(CURDIR)/debian/canfestival/usr/lib/* $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/src |
|
74 |
cp -a $(CURDIR)/debian/canfestival/usr/lib/libcanfestival_unix.a $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/drivers/unix |
|
75 |
cp $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen/canfestival_config.py $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen/canfestival_config_ori.py |
|
76 |
||
77 |
mkdir -p $(CURDIR)/debian/canfestival/usr/share/applications |
|
553
e411fab0f72d
removed dead hidden files
'Gr?gory Tr?lat <gregory.trelat@lolitech.fr>'
parents:
531
diff
changeset
|
78 |
cp objdictgen/networkedit.ico $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen |
e411fab0f72d
removed dead hidden files
'Gr?gory Tr?lat <gregory.trelat@lolitech.fr>'
parents:
531
diff
changeset
|
79 |
cp objdictgen/networkedit.png $(CURDIR)/debian/canfestival/usr/share/CanFestival-3/objdictgen |
531 | 80 |
cp debian/objdictedit.desktop $(CURDIR)/debian/canfestival/usr/share/applications/objdictedit.desktop |
346 | 81 |
|
82 |
dh_install -i --sourcedir=debian/canfestival |
|
83 |
||
84 |
binary-common: |
|
85 |
#### BINARY-COMMON #### |
|
86 |
dh_testdir |
|
87 |
dh_testroot |
|
88 |
dh_installchangelogs CHANGES |
|
612 | 89 |
# dh_installdocs |
346 | 90 |
# dh_installexamples |
91 |
# dh_installmenu |
|
92 |
# dh_installdebconf |
|
93 |
# dh_installlogrotate |
|
94 |
# dh_installemacsen |
|
95 |
# dh_installpam |
|
96 |
# dh_installmime |
|
97 |
# dh_python |
|
98 |
# dh_installinit |
|
99 |
# dh_installcron |
|
100 |
# dh_installinfo |
|
101 |
# dh_installman |
|
102 |
dh_link |
|
103 |
dh_strip |
|
104 |
dh_compress |
|
105 |
dh_fixperms |
|
106 |
# dh_perl |
|
107 |
# dh_makeshlibs |
|
108 |
dh_installdeb |
|
109 |
# dh_shlibdeps -l /usr/lib |
|
110 |
dh_gencontrol |
|
111 |
dh_md5sums |
|
112 |
dh_builddeb |
|
113 |
# Build architecture independant packages using the common target. |
|
114 |
binary-indep: build-indep install-indep |
|
115 |
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common |
|
116 |
||
531 | 117 |
binary: binary-indep |
118 |
.PHONY: build clean binary-indep binary install install-indep |