1 |
jpye |
1396 |
#!/usr/bin/make -f |
2 |
|
|
# -*- makefile -*- |
3 |
|
|
|
4 |
|
|
CFLAGS = -Wall -g |
5 |
jpye |
1523 |
|
6 |
jpye |
1815 |
SCONS_OPTIONS = CC="ccache gcc" \ |
7 |
|
|
CXX="ccache g++" \ |
8 |
jpye |
2029 |
ABSOLUTE_PATHS=1 \ |
9 |
jpye |
1523 |
INSTALL_PREFIX=/usr \ |
10 |
jpye |
1760 |
WITH_DOC_BUILD=0 \ |
11 |
|
|
WITH_DOC_INSTALL=1 \ |
12 |
jpye |
1648 |
F2C_LIB=gfortran \ |
13 |
jpye |
1815 |
FORTRAN=gfortran \ |
14 |
jpye |
2483 |
WITH_SOLVERS=CMSLV,CONOPT,DOPRI5,IDA,LRSLV,LSODE,QRSLV,IPOPT \ |
15 |
|
|
DEBUG=1 |
16 |
jpye |
1648 |
|
17 |
jpye |
1820 |
# F2C_LIBPATH=/usr/lib/gcc/i486-linux-gnu/4.2.1/ \ |
18 |
|
|
|
19 |
jpye |
1396 |
SCONS= scons $(SCONS_OPTIONS) |
20 |
|
|
|
21 |
|
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
22 |
|
|
CFLAGS += -O0 |
23 |
|
|
else |
24 |
|
|
CFLAGS += -O2 |
25 |
|
|
endif |
26 |
|
|
|
27 |
|
|
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
28 |
|
|
INSTALL_PROGRAM += -s |
29 |
|
|
endif |
30 |
|
|
|
31 |
jpye |
2328 |
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
32 |
|
|
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) |
33 |
|
|
SCONS_OPTIONS += -j$(NUMJOBS) |
34 |
|
|
endif |
35 |
|
|
|
36 |
jpye |
1396 |
# shared library versions, option 1 |
37 |
|
|
major=0 |
38 |
|
|
|
39 |
jpye |
2007 |
INSTALLROOT=$(CURDIR)/debian/tmp |
40 |
jpye |
1421 |
DATADIR=$(INSTALLROOT)/usr/share |
41 |
|
|
|
42 |
jpye |
2685 |
GTKSOURCEVIEW=gtksourceview-2.0 |
43 |
jpye |
1760 |
GTKSOURCEVIEWLANGS=$(DATADIR)/$(GTKSOURCEVIEW)/language-specs |
44 |
jpye |
2685 |
GTKSOURCEVIEW3=gtksourceview-3.0 |
45 |
|
|
GTKSOURCEVIEW3LANGS=$(DATADIR)/$(GTKSOURCEVIEW)/language-specs |
46 |
jpye |
1760 |
|
47 |
jpye |
1396 |
build: build-stamp |
48 |
|
|
build-stamp: |
49 |
|
|
dh_testdir |
50 |
jpye |
2612 |
cd $(CURDIR) && $(SCONS) |
51 |
jpye |
1396 |
touch build-stamp |
52 |
|
|
|
53 |
|
|
clean: |
54 |
|
|
dh_testdir |
55 |
|
|
rm -f build-stamp |
56 |
|
|
dh_clean |
57 |
jpye |
1544 |
$(SCONS) -c |
58 |
jpye |
1545 |
rm -rf .scon* |
59 |
|
|
rm scons/*.pyc |
60 |
jpye |
1396 |
|
61 |
|
|
install: build |
62 |
|
|
dh_testdir |
63 |
jpye |
1413 |
# dh_testroot |
64 |
jpye |
1396 |
dh_clean -k |
65 |
|
|
dh_installdirs |
66 |
jpye |
1421 |
mkdir -p $(INSTALLROOT)/usr |
67 |
|
|
cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(INSTALLROOT) install |
68 |
|
|
# |
69 |
jpye |
1425 |
cd $(CURDIR)/pygtk/gnome && \ |
70 |
jpye |
1545 |
install -m 644 -D ascend.desktop $(DATADIR)/applications/ascend.desktop && \ |
71 |
|
|
install -m 644 -D ascend.png $(DATADIR)/icons/ascend-app.png && \ |
72 |
|
|
install -m 644 -D ascend.png $(DATADIR)/icons/hicolor/64x64/ascend.png && \ |
73 |
jpye |
1609 |
install -m 644 -D ascend.xml $(DATADIR)/mime/packages/ascend.xml |
74 |
jpye |
1421 |
# |
75 |
jpye |
1611 |
# file-type icon for ascend models (double click should open in ASCEND) |
76 |
|
|
cd $(CURDIR)/pygtk/glade && \ |
77 |
jpye |
1931 |
install -m 644 -D ascend-doc-48x48.svg $(DATADIR)/icons/hicolor/scalable/mimetypes/text-x-ascend-model.svg && \ |
78 |
jpye |
1932 |
install -m 644 -D ascend-doc-16x16.png $(DATADIR)/icons/hicolor/16x16/mimetypes/text-x-ascend-model.png && \ |
79 |
|
|
install -m 644 -D ascend-doc-22x22.png $(DATADIR)/icons/hicolor/22x22/mimetypes/text-x-ascend-model.png && \ |
80 |
|
|
install -m 644 -D ascend-doc-24x24.png $(DATADIR)/icons/hicolor/24x24/mimetypes/text-x-ascend-model.png && \ |
81 |
jpye |
1931 |
install -m 644 -D ascend-doc-32x32.png $(DATADIR)/icons/hicolor/32x32/mimetypes/text-x-ascend-model.png && \ |
82 |
|
|
install -m 644 -D ascend-doc-48x48.png $(DATADIR)/icons/hicolor/48x48/mimetypes/text-x-ascend-model.png && \ |
83 |
|
|
install -m 644 -D ascend-doc-64x64.png $(DATADIR)/icons/hicolor/64x64/mimetypes/text-x-ascend-model.png |
84 |
jpye |
1611 |
# |
85 |
|
|
# syntax highlighting for gedit |
86 |
jpye |
2685 |
cd $(CURDIR)/tools/$(GTKSOURCEVIEW3) && \ |
87 |
|
|
install -m 644 -D ascend.lang $(GTKSOURCEVIEW3LANGS)/ascend.lang |
88 |
|
|
# |
89 |
|
|
# syntax highlighting for internal use (view model code) |
90 |
jpye |
1760 |
cd $(CURDIR)/tools/$(GTKSOURCEVIEW) && \ |
91 |
|
|
install -m 644 -D ascend.lang $(GTKSOURCEVIEWLANGS)/ascend.lang |
92 |
jpye |
2685 |
|
93 |
jpye |
2007 |
dh_install --fail-missing --sourcedir=$(INSTALLROOT) |
94 |
|
|
|
95 |
|
|
dh_installman |
96 |
jpye |
1396 |
|
97 |
|
|
# Build architecture-independent files here. |
98 |
|
|
binary-indep: |
99 |
|
|
dh_testdir |
100 |
|
|
dh_testroot |
101 |
jpye |
1762 |
-cd $(CUR_DIR) && $(SCONS) doc |
102 |
jpye |
1396 |
|
103 |
|
|
# Build architecture-dependent files here. |
104 |
|
|
binary-arch: build install |
105 |
|
|
dh_testdir |
106 |
|
|
dh_testroot |
107 |
|
|
dh_installchangelogs CHANGELOG.txt |
108 |
|
|
dh_installdocs |
109 |
|
|
dh_installexamples |
110 |
|
|
dh_installman |
111 |
|
|
dh_link |
112 |
jpye |
2483 |
dh_strip --dbg-package=ascend-dbg |
113 |
jpye |
1396 |
dh_compress |
114 |
|
|
dh_fixperms |
115 |
|
|
dh_makeshlibs |
116 |
|
|
dh_installdeb |
117 |
jpye |
2007 |
dh_shlibdeps |
118 |
jpye |
1396 |
dh_gencontrol |
119 |
|
|
dh_md5sums |
120 |
|
|
dh_builddeb |
121 |
|
|
|
122 |
|
|
binary: binary-indep binary-arch |
123 |
|
|
.PHONY: build clean binary-indep binary-arch binary install configure |
124 |
|
|
|