File: rules

package info (click to toggle)
itsol 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch, wheezy
  • size: 2,096 kB
  • ctags: 551
  • sloc: ansic: 6,795; sh: 686; fortran: 349; makefile: 76
file content (128 lines) | stat: -rwxr-xr-x 3,180 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/usr/bin/make -f

PACKAGE=itsol

DEB_SOURCE_PACKAGE:=$(PACKAGE)
include /usr/share/quilt/quilt.make

STATIC_BUILD_PATH = DEB_build_static
SHARED_BUILD_PATH = DEB_build_shared


# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

get-orig-source:
	. debian/get-orig-source

CMAKE_FLAGS = -DCMAKE_INSTALL_PREFIX:PATH=/usr \
              -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" \
              -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \
              -DCMAKE_SKIP_RPATH:BOOL=ON \
              -DBUILD_TESTING:BOOL=OFF


configure: configure-stamp
configure-stamp: $(QUILT_STAMPFN)
	dh_testdir

	if [ ! -d $(STATIC_BUILD_PATH) ]; then mkdir $(STATIC_BUILD_PATH); fi
	cd $(STATIC_BUILD_PATH) \
            && cmake .. $(CMAKE_FLAGS) -DBUILD_SHARED_LIBS:BOOL=OFF
	cd $(STATIC_BUILD_PATH) \
            && cmake .. $(CMAKE_FLAGS) -DBUILD_SHARED_LIBS:BOOL=OFF

	if [ ! -d $(SHARED_BUILD_PATH) ]; then mkdir $(SHARED_BUILD_PATH); fi
	cd $(SHARED_BUILD_PATH) \
	    && cmake $(CURDIR) $(CMAKE_FLAGS) -DBUILD_SHARED_LIBS:BOOL=ON
	cd $(SHARED_BUILD_PATH) \
	    && cmake $(CURDIR) $(CMAKE_FLAGS) -DBUILD_SHARED_LIBS:BOOL=ON

	touch $@


build: build-stamp
build-stamp: configure-stamp  
	dh_testdir

        # build static libs
	$(MAKE) $(JOBS) -C $(STATIC_BUILD_PATH)

	# build shared libs and binaries
	$(MAKE) $(JOBS) -C $(SHARED_BUILD_PATH)

	# build tests
#	cd TESTS_HB \
#              && make all
#	cd TESTS_COO \
#              && make all


	# run tests
#	cd TESTS_HB \
#              && chmod 755 runall
#	cd TESTS_HB \
#              && ./runall
#	cd TESTS_COO \
#              && ./runall



	touch $@

clean: clean-patched unpatch

clean-patched: 
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	rm -rf $(STATIC_BUILD_PATH)
	rm -rf $(SHARED_BUILD_PATH)

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the package into debian/tmp
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp        install -C $(STATIC_BUILD_PATH)
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp/shared install -C $(SHARED_BUILD_PATH)
	dh_install -plibitsol-dev    usr/lib/libitsol.a   usr/lib
	dh_install -plibitsol-dev    LIB/globheads.h             usr/include/itsol
	dh_install -plibitsol-dev    LIB/defs.h                  usr/include/itsol
	dh_install -plibitsol-dev    LIB/protos.h                usr/include/itsol
	dh_install -plibitsol-dev    ios.h                       usr/include/itsol
	dh_install -plibitsol-dev    shared/usr/lib/libitsol.so         usr/lib
	dh_install -plibitsol1       shared/usr/lib/libitsol.so.1       usr/lib
	dh_install -plibitsol1       shared/usr/lib/libitsol.so.1.0.0   usr/lib


# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs 
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure