File: rules

package info (click to toggle)
glut 3.7-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 12,360 kB
  • ctags: 39,914
  • sloc: ansic: 148,715; makefile: 28,471; ada: 2,062; yacc: 473; fortran: 290; lex: 131; csh: 51; sed: 49; sh: 33
file content (208 lines) | stat: -rwxr-xr-x 7,967 bytes parent folder | download
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
#! /usr/bin/make -f
#

MAJOR=3
MINOR=7
CC = gcc
CFLAGS = -O2 -DFBIND=2 -g -Wall
LDFLAGS =

SHELL = /bin/sh
srcdir = .

INSTALL = /usr/bin/install
INSTALL_PROGRAM = $(INSTALL) -m 755 -o root -g root
INSTALL_LIB = $(INSTALL) -m 644 -o root -g root
INSTALL_DATA = $(INSTALL) -m 644 -o root -g root
INSTALL_DIR = $(INSTALL) -d -m 755 -o root -g root
GNUARCH = $(shell dpkg --print-gnu-build-architecture)

config:
	$(checkdir)
	./mkmkfiles.imake
	touch stamp-config

build:
	$(checkdir)
	test -f stamp-config || $(MAKE) -f debian/rules config
	-mkdir libs.libc6
	( cd lib/glut && rm -f *.o && \
	  $(MAKE) CCOPTIONS='-ansi -fPIC' && \
	  gcc -shared -Wl,-soname,libglut.so.$(MAJOR) -o libglut.so.$(MAJOR).$(MINOR) *.o -lc && \
	  echo gcc -shared -Wl,-soname,libglut.so.$(MAJOR) -o libglut.so.$(MAJOR).$(MINOR) *.o -lc && \
	  mv libglut.so.$(MAJOR).$(MINOR) ../../libs.libc6 && \
	  $(MAKE) clean && \
	  $(MAKE) && \
	  mv libglut.a ../../libs.libc6 )
	( cd man/glut && \
	  $(MAKE) install.man DESTDIR='../manpages' )
	( cd lib/gle && rm -f *.o && \
	  $(MAKE) CCOPTIONS='-ansi -fPIC' && \
	  gcc -shared -Wl,-soname,libgle.so.$(MAJOR) -o libgle.so.$(MAJOR).$(MINOR) *.o -lc && \
	  echo gcc -shared -Wl,-soname,libgle.so.$(MAJOR) -o libgle.so.$(MAJOR).$(MINOR) *.o -lc && \
	  mv libgle.so.$(MAJOR).$(MINOR) ../../libs.libc6 && \
	  $(MAKE) clean && \
	  $(MAKE) && \
	  mv libgle.a ../../libs.libc6 )
	( cd lib/mui && rm -f *.o && \
	  $(MAKE) CCOPTIONS='-ansi -fPIC' && \
	  gcc -shared -Wl,-soname,libmui.so.$(MAJOR) -o libmui.so.$(MAJOR).$(MINOR) *.o -lc && \
	  echo gcc -shared -Wl,-soname,libmui.so.$(MAJOR) -o libmui.so.$(MAJOR).$(MINOR) *.o -lc && \
	  mv libmui.so.$(MAJOR).$(MINOR) ../../libs.libc6 && \
	  $(MAKE) clean && \
	  $(MAKE) && \
	  mv libmui.a ../../libs.libc6 )
	( cd man/gle && \
	  $(MAKE) install.man DESTDIR='../manpages' )
	( cd lib/glsmap && rm -f *.o && \
	  $(MAKE) CCOPTIONS='-ansi -fPIC' && \
	  gcc -shared -Wl,-soname,libglsmap.so.$(MAJOR) -o libglsmap.so.$(MAJOR).$(MINOR) *.o -lc && \
	  echo gcc -shared -Wl,-soname,libglsmap.so.$(MAJOR) -o libglsmap.so.$(MAJOR).$(MINOR) *.o -lc && \
	  mv libglsmap.so.$(MAJOR).$(MINOR) ../../libs.libc6 && \
	  $(MAKE) clean && \
	  $(MAKE) && \
	  mv libglsmap.a ../../libs.libc6 )
	touch stamp-build

clean:
	$(checkdir)
	-rm -rf libs.libc*
	-rm *.tar.gz
	-rm -rf lib/glut/*.so* lib/glut/stKhdgXc
	-rm -rf man/manpages
	-$(MAKE) clean
	# -find . -name 'Makefile' -print0 |xargs -0r rm -f
	-find . -name 'Makefile.bak' -print0 |xargs -0r rm -f
	-rm -f stamp-config stamp-build
	-rm -rf debian/tmp* debian/files* debian/substvars

binary-arch: checkroot
	$(checkdir)
	-rm -rf debian/tmp-g3 debian/tmp-g3dev debian/tmp-3 debian/tmp-3dev
	test -f stamp-build || $(MAKE) -f debian/rules build
#
#
# make glutg3 in debian/tmp-g3
	$(INSTALL_DIR) debian/tmp-g3
	$(INSTALL_DIR) debian/tmp-g3/DEBIAN
	$(INSTALL_DATA) debian/shlibs.libc6 debian/tmp-g3/DEBIAN/shlibs
	$(INSTALL_PROGRAM) debian/postinst debian/tmp-g3/DEBIAN/postinst
	$(INSTALL_PROGRAM) debian/prerm debian/tmp-g3/DEBIAN/prerm
# libraries
	$(INSTALL_DIR) debian/tmp-g3/usr/lib
	$(INSTALL_LIB) libs.libc6/lib*.so.$(MAJOR).$(MINOR) debian/tmp-g3/usr/lib
	-strip --strip-unneeded debian/tmp-g3/usr/lib/lib*.so.$(MAJOR).$(MINOR)
	ln -s libglut.so.$(MAJOR).$(MINOR) debian/tmp-g3/usr/lib/libglut.so.$(MAJOR)
	ln -s libgle.so.$(MAJOR).$(MINOR) debian/tmp-g3/usr/lib/libgle.so.$(MAJOR)
	ln -s libmui.so.$(MAJOR).$(MINOR) debian/tmp-g3/usr/lib/libmui.so.$(MAJOR)
	ln -s libglsmap.so.$(MAJOR).$(MINOR) debian/tmp-g3/usr/lib/libglsmap.so.$(MAJOR)
# documentation
	$(INSTALL_DIR) debian/tmp-g3/usr/share/doc/glutg3
	$(INSTALL_DATA) debian/copyright debian/tmp-g3/usr/share/doc/glutg3
	$(INSTALL_DATA) debian/changelog debian/tmp-g3/usr/share/doc/glutg3/changelog.Debian
	$(INSTALL_DATA) CHANGES debian/tmp-g3/usr/share/doc/glutg3/changelog
	gzip -9 debian/tmp-g3/usr/share/doc/glutg3/changelog*
#
	$(INSTALL_DATA) README README.glut2 README.glut3 debian/tmp-g3/usr/share/doc/glutg3
	$(INSTALL_DATA) README.mui debian/tmp-g3/usr/share/doc/glutg3
	$(INSTALL_DATA) Portability.txt FAQ.glut debian/tmp-g3/usr/share/doc/glutg3
	gzip -9 debian/tmp-g3/usr/share/doc/glutg3/FAQ.glut
#
	dpkg-shlibdeps debian/tmp-g3/usr/lib/lib*.so.$(MAJOR).$(MINOR)
	dpkg-gencontrol -isp -pglutg3 -Pdebian/tmp-g3
	dpkg --build debian/tmp-g3 ..
#
#
# make glutg3-dev in debian/tmp-g3dev
	$(INSTALL_DIR) debian/tmp-g3dev
	$(INSTALL_DIR) debian/tmp-g3dev/DEBIAN
	$(INSTALL_PROGRAM) debian/postinst-dev debian/tmp-g3dev/DEBIAN/postinst
	$(INSTALL_PROGRAM) debian/prerm-dev debian/tmp-g3dev/DEBIAN/prerm
# libraries
	$(INSTALL_DIR) debian/tmp-g3dev/usr/lib
	$(INSTALL_LIB) libs.libc6/libglut.a debian/tmp-g3dev/usr/lib
	$(INSTALL_LIB) libs.libc6/libgle.a debian/tmp-g3dev/usr/lib
	$(INSTALL_LIB) libs.libc6/libmui.a debian/tmp-g3dev/usr/lib
	$(INSTALL_LIB) libs.libc6/libglsmap.a debian/tmp-g3dev/usr/lib
	-strip --strip-debug debian/tmp-g3dev/usr/lib/lib*.a
	ln -s libglut.so.$(MAJOR) debian/tmp-g3dev/usr/lib/libglut.so
	ln -s libgle.so.$(MAJOR) debian/tmp-g3dev/usr/lib/libgle.so
	ln -s libmui.so.$(MAJOR) debian/tmp-g3dev/usr/lib/libmui.so
	ln -s libglsmap.so.$(MAJOR) debian/tmp-g3dev/usr/lib/libglsmap.so
# documentation
	$(INSTALL_DIR) debian/tmp-g3dev/usr/share/doc/glutg3-dev
	$(INSTALL_DATA) debian/copyright debian/tmp-g3dev/usr/share/doc/glutg3-dev
	$(INSTALL_DATA) debian/changelog debian/tmp-g3dev/usr/share/doc/glutg3-dev/changelog.Debian
	$(INSTALL_DATA) CHANGES debian/tmp-g3dev/usr/share/doc/glutg3-dev/changelog
	gzip -9 debian/tmp-g3dev/usr/share/doc/glutg3-dev/changelog*

# includes
	$(INSTALL_DIR) debian/tmp-g3dev/usr/include/GL
	$(INSTALL_DATA) include/GL/*.h debian/tmp-g3dev/usr/include/GL
	$(INSTALL_DIR) debian/tmp-g3dev/usr/include/mui
	$(INSTALL_DATA) include/mui/mui.h debian/tmp-g3dev/usr/include/mui
#
# build the development package
	dpkg-gencontrol -isp -pglutg3-dev -Pdebian/tmp-g3dev
	dpkg --build debian/tmp-g3dev ..

define checkdir
	test -f Glut.cf -a -f debian/rules
endef

binary-indep: checkroot
	$(checkdir)
	-rm -rf debian/tmp-doc
	test -f stamp-build || $(MAKE) -f debian/rules build
#
#
# make glut-doc in debian/tmp-doc
	$(INSTALL_DIR) debian/tmp-doc
	$(INSTALL_DIR) debian/tmp-doc/DEBIAN
	$(INSTALL_PROGRAM) debian/postinst-doc debian/tmp-doc/DEBIAN/postinst
	$(INSTALL_PROGRAM) debian/prerm-doc debian/tmp-doc/DEBIAN/prerm
	$(INSTALL_DIR) debian/tmp-doc/usr/share/doc/glut-doc
	$(INSTALL_DATA) debian/copyright debian/tmp-doc/usr/share/doc/glut-doc
	$(INSTALL_DATA) debian/changelog debian/tmp-doc/usr/share/doc/glut-doc/changelog.Debian
	gzip -9 debian/tmp-doc/usr/share/doc/glut-doc/changelog.Debian
# man pages
	$(INSTALL_DIR) debian/tmp-doc/usr/X11R6/man
	$(INSTALL_DIR) debian/tmp-doc/usr/X11R6/man/man3
	$(INSTALL_DATA) man/manpages/usr/X11R6/man/man3/* \
	  debian/tmp-doc/usr/X11R6/man/man3
	-gzip -9f debian/tmp-doc/usr/X11R6/man/man3/*
# examples
	$(INSTALL_DIR) debian/tmp-doc/usr/share/doc/glut-doc/examples
	tar -chf advanced.tar progs/advanced
	tar -chf advanced97.tar progs/advanced97
	tar -chf bucciarelli.tar progs/bucciarelli
	tar -chf contrib.tar progs/contrib
	tar -chf demos.tar progs/demos
	tar -chf examples.tar progs/examples
	# tar -chf fortran.tar progs/fortran
	# tar -chf gameglut.tar progs/gameglut
	# tar -chf glc.tar progs/glc
	tar -chf gle.tar progs/gle
	# tar -chf inventor.tar progs/inventor
	tar -chf mesademos.tar progs/mesademos
	tar -chf mu.tar progs/mui
	tar -chf perf_harness.tar progs/perf_harness
	tar -chf redbook.tar progs/redbook
	tar -chf spheremap.tar progs/spheremap
	tar -chf texfont.tar progs/texfont
	tar -chf tiff.tar progs/tiff
	tar -chf test.tar test
	-gzip -9f *.tar
	$(INSTALL_DATA) *.tar.gz Glut.cf debian/tmp-doc/usr/share/doc/glut-doc/examples
#
	dpkg-gencontrol -isp -pglut-doc -Pdebian/tmp-doc
	dpkg --build debian/tmp-doc ..

binary: binary-arch binary-indep

checkroot:
	$(checkdir)
	test root = "`whoami`"

.PHONY: config clean binary binary-arch binary-indep