1 |
#!/usr/bin/make -f |
2 |
# -*- makefile -*- |
3 |
|
4 |
CFLAGS = -Wall -g |
5 |
|
6 |
SCONS_OPTIONS = CC="ccache gcc" \ |
7 |
CXX="ccache g++" \ |
8 |
INSTALL_PREFIX=/usr \ |
9 |
WITH_DOC_BUILD=0 \ |
10 |
WITH_DOC_INSTALL=1 |
11 |
SCONS= scons $(SCONS_OPTIONS) |
12 |
|
13 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
14 |
CFLAGS += -O0 |
15 |
else |
16 |
CFLAGS += -O2 |
17 |
endif |
18 |
|
19 |
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
20 |
INSTALL_PROGRAM += -s |
21 |
endif |
22 |
|
23 |
# shared library versions, option 1 |
24 |
major=0 |
25 |
|
26 |
INSTALLROOT=$(CURDIR)/debian/ascend/ |
27 |
DATADIR=$(INSTALLROOT)/usr/share |
28 |
|
29 |
build: build-stamp |
30 |
build-stamp: |
31 |
dh_testdir |
32 |
cd $(CURDIR) && $(SCONS) libascend tcltk pygtk models |
33 |
touch build-stamp |
34 |
|
35 |
clean: |
36 |
dh_testdir |
37 |
rm -f build-stamp |
38 |
dh_clean |
39 |
$(SCONS) -c |
40 |
rm -rf .scon* |
41 |
rm scons/*.pyc |
42 |
|
43 |
install: build |
44 |
dh_testdir |
45 |
# dh_testroot |
46 |
dh_clean -k |
47 |
dh_installdirs |
48 |
mkdir -p $(INSTALLROOT)/usr |
49 |
cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(INSTALLROOT) install |
50 |
# |
51 |
cd $(CURDIR)/pygtk/gnome && \ |
52 |
install -m 644 -D ascend.desktop $(DATADIR)/applications/ascend.desktop && \ |
53 |
install -m 644 -D ascend.png $(DATADIR)/icons/ascend-app.png && \ |
54 |
install -m 644 -D ascend.png $(DATADIR)/icons/hicolor/64x64/ascend.png && \ |
55 |
install -m 644 -D ascend.xml $(CURDIR)/debian/ascend.mime |
56 |
# |
57 |
dh_install --autodest |
58 |
dh_desktop |
59 |
dh_installmime |
60 |
dh_installman debian/ascend.man |
61 |
dh_installman debian/ascend4.man |
62 |
dh_installman debian/ascend-config.man |
63 |
|
64 |
# Build architecture-independent files here. |
65 |
binary-indep: |
66 |
dh_testdir |
67 |
dh_testroot |
68 |
-cd $(CUR_DIR) && $(SCONS) doc |
69 |
|
70 |
# Build architecture-dependent files here. |
71 |
binary-arch: build install |
72 |
dh_testdir |
73 |
dh_testroot |
74 |
dh_installchangelogs CHANGELOG.txt |
75 |
dh_installdocs |
76 |
dh_installexamples |
77 |
dh_installman |
78 |
dh_link |
79 |
dh_strip |
80 |
dh_compress |
81 |
dh_fixperms |
82 |
dh_makeshlibs |
83 |
dh_installdeb |
84 |
dh_shlibdeps -L ascend -l debian/ascend/usr/lib |
85 |
dh_gencontrol |
86 |
dh_md5sums |
87 |
dh_builddeb |
88 |
|
89 |
binary: binary-indep binary-arch |
90 |
.PHONY: build clean binary-indep binary-arch binary install configure |