File: rules

package info (click to toggle)
libterralib 4.3.0%2Bdfsg.2-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 61,564 kB
  • ctags: 37,110
  • sloc: cpp: 225,052; ansic: 31,562; makefile: 807; sh: 80; xml: 37
file content (46 lines) | stat: -rwxr-xr-x 1,830 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# -*- makefile -*-

# The magic debhelper rule
%:
	dh $@

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

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
AUTOGENERATED:= libterralib-dev.links libterralib3.install libterralib-dev.install libterralib.pc 

# To enable all, uncomment following line
DEB_BUILD_MAINT_OPTIONS:= hardening=+all
DEB_CFLAGS_MAINT_APPEND:= -Wall -pedantic
export DEB_BUILD_MAINT_OPTIONS
export DEB_CFLAGS_MAINT_APPEND
CXXFLAGS:= $(shell dpkg-buildflags --get CXXFLAGS) -std=c++11
CXXFLAGS:= '$(CXXFLAGS) -fpermissive -I/usr/include/geotiff -I/usr/include/dxflib -I/usr/include/qwt'

override_dh_auto_build:
	find examples -type f -exec chmod 644 {} \;
	for f in ${AUTOGENERATED} ; do \
                sed -e 's%@DEB_HOST_MULTIARCH@%${DEB_HOST_MULTIARCH}%g' < debian/$$f.in  > debian/$$f ; \
                done
	for d in terralib te_functions te_utils image_processing PostgreSQL MySQL shapelib stat te_dxf te_shapelib   ; do \
		( cd build/qt4/$$d  && qmake QMAKE_CXXFLAGS=$(CXXFLAGS) $$d.pro     && $(MAKE) ) ; \
		done
	# Disable qwt, terraView work until after libqwt-qt5-dev transition
	#for d in qwt ; do \
	#	( cd build/qt/$$d  && qmake QMAKE_CXXFLAGS=$(CXXFLAGS) $$d.pro     && $(MAKE) ) ; \
	#	done
	for d in terralib te_functions te_utils terralibpdi shapelib te_shapelib te_mysql te_postgresql te_dxf stat ; do \
		ar rcs Release/lib$$d.a `LC_ALL=C ls Release/linux-g++/obj/$$d/*.o` ;\
		done

override_dh_clean:
	dh_clean
	rm -rf Release
	rm -f $(patsubst %, debian/%, ${AUTOGENERATED})
	find . -name '.cvsignore' -delete
	for d in terralib te_functions te_utils image_processing PostgreSQL MySQL shapelib stat te_dxf te_shapelib  ; do \
		( $(MAKE) -C build/qt4/$$d distclean || echo "$$d already clean" ) ; \
		done