forked from pngwriter/pngwriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
302 lines (227 loc) · 9.86 KB
/
Makefile
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
############ MAKEFILE FOR PNGWRITER ######################################
#
#
# Website: Main: http://pngwriter.sourceforge.net/
# Sourceforge.net: http://sourceforge.net/projects/pngwriter/
# Freshmeat.net: http://freshmeat.net/projects/pngwriter/
#
# Author: Paul Blackburn
#
# Email: individual61@users.sourceforge.net
#
# Version: 0.5.4 (19 / II / 2009)
#
# Description: Library that allows plotting a 48 bit
# PNG image pixel by pixel, which can
# then be opened with a graphics program.
#
# License: GNU General Public License
# Copyright 2002, 2003, 2004, 2005, 2006,
# 2007, 2008, 2009 Paul Blackburn
#
##############################################################################
################# IMPORTANT - IMPORTANTE #####################################
#
# Please read the README file for instructions on compilation options.
#
# Por favor lee el archivo LEAME en doc/espaniol/ para conocer las
# opciones de compilacion.
#
##############################################################################
# ENGLISH
# Default installation is for a Linux/UNIX type system.
# Makefile options for Mac OS X (with Fink-installed libpng)
# are also available. See the README.
# CASTELLANO/ESPANIOL
# La instalacion normal es para un sistema tipo Linux/UNIX
# Existen opciones del Makefile para Mac OS X con libpng y FreeType2 instalado
# via Fink. Vea el LEAME.
##############################################################################
include make.include
MAJVERSION=0
MINVERSION=5.4
VERSION=$(MAJVERSION).$(MINVERSION)
ifdef P_FREETYPE
FT_REPORT = without
else
FT_REPORT = with
endif
all : libpngwriter examples
libpngwriter: intro
cd src; make
examples: libpngwriter
cd examples; make
intro :
@ echo "#"
@ echo "#"
@ echo "# PNGwriter $(VERSION)"
@ echo "# Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Paul Blackburn"
@ echo "# http://pngwriter.sourceforge.net/"
@ echo "# This library and its associated files are covered"
@ echo "# by the GNU General Public License."
@ echo "#"
@ echo "# Using $(SELF) for your compilation/installation prefs."
@ echo "#"
@ echo "# Important: If you do not have FreeType2 installed, "
@ echo "# see the README for instructions on compiling PNGwriter"
@ echo "# without FreeType2 support."
@ echo "#"
@ echo "# Importante: Si no tienes FreeType2 instalado,"
@ echo "# lee el archivo LEAME en doc/espaniol para "
@ echo "# instrucciones acerca de como compilar PNGwriter"
@ echo "# sin soporte para FreeType2. "
@ echo "#"
@ echo "# You have selected to compile PNGwriter $(FT_REPORT)"
@ echo "# FreeType2 support."
@ echo "#"
@ echo "#"
install: docs
@ echo "#"
@ echo "#"
@ echo "# PNGwriter $(VERSION)"
@ echo "# Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Paul Blackburn"
@ echo "# http://pngwriter.sourceforge.net/"
@ echo "# This library and its associated files are covered"
@ echo "# by the GNU General Public License."
@ echo "#"
@ echo "# Note: You can only install to a directory you own,"
@ echo "# if you are not root. To install elsewhere, compile "
@ echo "# PNGwriter by giving Make the destination directory:"
@ echo "#"
@ echo "# make DESTDIR=$HOME (for example)"
@ echo "#"
@ echo "# Alternatively, you can change DESTDIR in 'make.include'."
@ echo "#"
@ echo "# Using $(SELF) for your compilation/installation prefs."
@ echo "#"
@ echo "# The following files will be installed:"
@ echo "#"
@ echo "# pngwriter.h in $(DESTDIR)$(PREFIX)/include/"
@ echo "# libpngwriter.a in $(DESTDIR)$(PREFIX)/lib/"
@ echo "# examples/ in $(DESTDIR)$(PREFIX)/share/doc/pngwriter/"
@ echo "# doc/ in $(DESTDIR)$(PREFIX)/share/doc/pngwriter/"
@ echo "# Fonts in $(DESTDIR)$(PREFIX)/share/pngwriter/fonts"
@ echo "#"
@ echo "#"
$(INSTALL) -d -v $(DESTDIR)$(PREFIX)/include/ $(DESTDIR)$(PREFIX)/lib/
$(INSTALL) -d -v $(DESTDIR)$(PREFIX)/share/pngwriter/fonts/
$(INSTALL) -S -v -m644 src/pngwriter.h $(DESTDIR)$(PREFIX)/include/
$(INSTALL) -S -v -m644 src/libpngwriter.a $(DESTDIR)$(PREFIX)/lib/
$(INSTALL) -S -v -m644 fonts/* $(DESTDIR)$(PREFIX)/share/pngwriter/fonts/
$(INSTALL) -d -v $(DESTDIR)$(PREFIX)/share/doc/pngwriter
cp -pR doc/* $(DESTDIR)$(PREFIX)/share/doc/pngwriter
$(INSTALL) -d -v $(DESTDIR)$(PREFIX)/share/doc/pngwriter/examples
cp examples/*.cc examples/*png \
$(DESTDIR)$(PREFIX)/share/doc/pngwriter/examples/
$(OSXSPECIFIC)
docs :
cp README README.bak
cat README.bak | \
sed 's# - libpngwriter.a:# - libpngwriter.a: $(PREFIX)/lib/#g' > README
cp README README.bak
cat README.bak | \
sed 's# - pngwriter.h:# - pngwriter.h: $(PREFIX)/include/#g' > README
cp README README.bak
cat README.bak | \
sed 's# - documentation:# - documentation: $(PREFIX)/share/doc/pngwriter/#g' > README
cp README README.bak
cat README.bak | \
sed 's# - examples:# - examples: $(PREFIX)/share/doc/pngwriter/#g' > README
cp README README.bak
cat README.bak | \
sed 's# - fonts:# - fonts: $(PREFIX)/share/pngwriter/fonts/#g' > README
rm README.bak
#
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - libpngwriter.a:# - libpngwriter.a: $(PREFIX)/lib/#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - pngwriter.h:# - pngwriter.h: $(PREFIX)/include/#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - documentation:# - documentation: $(PREFIX)/share/doc/pngwriter/#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - examples:# - examples: $(PREFIX)/share/doc/pngwriter/#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - fonts:# - fonts: $(PREFIX)/share/pngwriter/fonts/#g' > doc/english/README
rm doc/english/README.bak
#
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - libpngwriter.a:# - libpngwriter.a: $(PREFIX)/lib/#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - pngwriter.h:# - pngwriter.h: $(PREFIX)/include/#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - documentacion:# - documentacion: $(PREFIX)/share/doc/pngwriter/#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - ejemplos:# - ejemplos: $(PREFIX)/share/doc/pngwriter/#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - fonts:# - fonts: $(PREFIX)/share/pngwriter/fonts/#g' > doc/espaniol/LEAME
rm doc/espaniol/LEAME.bak
rm -f READMEe doc/english/READMEe doc/espaniol/LEAMEe
clean :
cd src; make clean
cd examples; make clean
cd doc/english; rm -f CHANGES~ README~ LICENSE~ EXAMPLES~ .DS_Store
cd doc/espaniol; rm -f CAMBIOS~ LEAME~ LICENCIA~ EJEMPLOS~ .DS_Store
rm -f README~ Makefile~ make.include.linux~ make.include.osx~ .DS_Store
rm -f make.include.linux.oldcpp~ make.include.osx_test~ doc/.DS_Store
#
cp README README.bak
cat README.bak | \
sed 's# - libpngwriter.a: $(PREFIX)/lib/# - libpngwriter.a:#g' > README
cp README README.bak
cat README.bak | \
sed 's# - pngwriter.h: $(PREFIX)/include/# - pngwriter.h:#g' > README
cp README README.bak
cat README.bak | \
sed 's# - documentation: $(PREFIX)/share/doc/pngwriter/# - documentation:#g' > README
cp README README.bak
cat README.bak | \
sed 's# - examples: $(PREFIX)/share/doc/pngwriter/# - examples:#g' > README
cp README README.bak
cat README.bak | \
sed 's# - fonts: $(PREFIX)/share/pngwriter/fonts/# - fonts:#g' > README
rm README.bak
#
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - libpngwriter.a: $(PREFIX)/lib/# - libpngwriter.a:#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - pngwriter.h: $(PREFIX)/include/# - pngwriter.h:#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - documentacion: $(PREFIX)/share/doc/pngwriter/# - documentacion:#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - ejemplos: $(PREFIX)/share/doc/pngwriter/# - ejemplos:#g' > doc/espaniol/LEAME
cp doc/espaniol/LEAME doc/espaniol/LEAME.bak
cat doc/espaniol/LEAME.bak | \
sed 's# - fonts: $(PREFIX)/share/pngwriter/fonts/# - fonts:#g' > doc/espaniol/LEAME
rm doc/espaniol/LEAME.bak
#
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - libpngwriter.a: $(PREFIX)/lib/# - libpngwriter.a:#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - pngwriter.h: $(PREFIX)/include/# - pngwriter.h:#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - documentation: $(PREFIX)/share/doc/pngwriter/# - documentation:#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - examples: $(PREFIX)/share/doc/pngwriter/# - examples:#g' > doc/english/README
cp doc/english/README doc/english/README.bak
cat doc/english/README.bak | \
sed 's# - fonts: $(PREFIX)/share/pngwriter/fonts/# - fonts:#g' > doc/english/README
rm doc/english/README.bak
rm -f READMEe doc/english/READMEe doc/espaniol/LEAMEe