File: GNUmakefile

package info (click to toggle)
pyqwt3d 0.1.8-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 984 kB
  • sloc: python: 3,932; cpp: 328; makefile: 113; sh: 7
file content (154 lines) | stat: -rw-r--r-- 3,965 bytes parent folder | download | duplicates (6)
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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
# GNU-Makefile for PyQwt3D
#
# There are at least two options to log the output of make:
#
# (1) Invoke make and tie stderr to stdout and redirect stdout to LOG.txt:
#       make all-static 2&>1 >LOG.txt
#     However, you do not see what is going on.
#
# (2) Use script to capture all screen output of make to LOG.txt:
#       script -c 'make all-static' LOG.txt
#     The script command appeared in 3.0BSD and is part of util-linux.
#
# Edit QWT3DOPTIONS first.

# To compile and link the QwtPlot3D sources statically into PyQwt3D.
QWT3DDIR := $(shell pwd)/qwtplot3d-0.2.7

# To compile and link the zlib sources statically into PyQwt3D.
ZLIBDIR := $(shell pwd)/zlib-1.2.3

# To compile and link the libpng sources statically into PyQwt3D.
PNGVER := 1.2.18
PNGDIR := $(shell pwd)/libpng-$(PNGVER)

# Edit QWT3DOPTIONS first (DarwinPorts install in /opt/local).
#QWT3DOPTIONS := -Q $(QWT3DDIR) -Z $(ZLIBDIR) -D HAVE_LIBPNG -l png
QWT3DOPTIONS := -Q $(QWT3DDIR) -D HAVE_ZLIB -l z -D HAVE_LIBPNG  -I /opt/local/include -L /opt/local/lib -l png

# Do not edit below this line, unless you know what you are doing.
JOBS := $(shell getconf _NPROCESSORS_ONLN)
UNAME := $(shell uname)

ifeq ($(UNAME),Linux)
JOBS := $(shell getconf _NPROCESSORS_ONLN)
endif

ifeq ($(UNAME),Darwin)
JOBS := $(shell sysctl -n hw.ncpu)
endif

.PHONY: dist qwtplot-0.2.7

# Build and link PyQwt3D including the local source tree of Qwt3D.
all: 3 4

debug: 3d 4d

trace: 3t 4t

3:
	cd configure \
	&& python configure.py -3 $(QWT3DOPTIONS) -j $(JOBS) \
	&& $(MAKE) -j $(JOBS)

4:
	cd configure \
	&& python configure.py -4 $(QWT3DOPTIONS) -j $(JOBS) \
	&& $(MAKE) -j $(JOBS)

3d:
	cd configure \
	&& python configure.py --debug $(QWT3DOPTIONS) -j $(JOBS) \
	&& $(MAKE) -j $(JOBS)

4d:
	cd configure \
	&& python configure.py --debug -4 $(QWT3DOPTIONS) -j $(JOBS) \
	&& $(MAKE) -j $(JOBS)

3t:
	cd configure \
	&& python configure.py --debug --trace -3 $(QWT3DOPTIONS) -j $(JOBS) \
	&& $(MAKE) -j $(JOBS)

4t:
	cd configure \
	&& python configure.py --debug --trace -4 $(QWT3DOPTIONS) -j $(JOBS) \
	&& $(MAKE) -j $(JOBS)

# Installation.
install-3: 3
	make -C configure install

install-4: 4
	make -C configure install

install: install-3 install-4

install-3d: 3d
	make -C configure install

install-4d: 4d
	make -C configure install

install-debug: install-3d install-4d

install-3t: 3t
	make -C configure install

install-4t: 4t
	make -C configure install

install-trace: install-3t install-4t

# QwtPlot3D code.
qwtplot3d-doc.zip:
	wget http://qwtplot3d.sourceforge.net/qwtplot3d-doc.zip

qwtplot3d-0.2.7.tgz:
	wget http://prdownloads.sourceforge.net/qwtplot3d/qwtplot3d-0.2.7.tgz

qwtplot3d-0.2.7: qwtplot3d-doc.zip qwtplot3d-0.2.7.tgz
	rm -rf qwtplot3d qwtplot3d-doc qwtplot3d-0.2.7
	(unzip qwtplot3d-doc.zip; mv qwtplot3d qwtplot3d-doc)
	(tar xfz qwtplot3d-0.2.7.tgz; mv qwtplot3d qwtplot3d-0.2.7)
	./unbieber.py qwtplot3d-0.2.7 .c .cpp .h
	patch -p0 --fuzz=10 -b -z .pyqwt3d <pyqwt3d-0.2.7.patch
	cp -r qwtplot3d-doc/doc/doxygenimages qwtplot3d-0.2.7/doc/doxygenimages
	(cd qwtplot3d-0.2.7/doc; \
         mv Doxyfile.doxygen Doxyfile.doxygen.in; \
	 egrep -iv '(c|v):' Doxyfile.doxygen.in >Doxyfile.doxygen; \
	 doxygen -u Doxyfile.doxygen; \
	 doxygen Doxyfile.doxygen)

LIBPNG_TAR_GZ := libpng-1.2.18-no-config.tar.gz

libpng-$(PNGVER)-no-config.tar.gz:
	wget http://prdownloads.sourceforge.net/libpng/$@

libpng: libpng-$(PNGVER)-no-config.tar.gz
	tar xfz $<

diff:
	./gendiff qwtplot3d-0.2.7 .pyqwt3d >pyqwt3d-0.2.7.patch

# PyQwt3D documentation.
doc:
	(cd Doc && make doc && make htdoc)

clean:
	rm -f *~ */*~ */*/*~

distclean: clean
	find . -name '.#*' -o -name '*.pyc' | xargs rm -f
	rm -rf configure/Makefile
	rm -rf configure/OpenGL_Qt3 configure/tmp-OpenGL_Qt3
	rm -rf configure/OpenGL_Qt4 configure/tmp-OpenGL_Qt4
	rm -rf configure/Qwt3D_Qt3 configure/tmp-Qwt3D_Qt3
	rm -rf configure/Qwt3D_Qt4 configure/tmp-Qwt3D_Qt4

dist: all distclean doc
	python setup.py sdist

# EOF