FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gnuplot/config/makefile.cyg at master · gnuplot/gnuplot · GitHub
gnuplot
gnuplot
Repository navigation
Code
Pull requests
2
(2)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
gnuplot
/
config
/
makefile.cyg
Copy path
More file actions
More file actions
Latest commit
History
History
History
429 lines (344 loc) · 11.5 KB
Breadcrumbs
gnuplot
/
config
/
makefile.cyg
Copy path
File metadata and controls
429 lines (344 loc) · 11.5 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
#
Hey, Emacs, this is a -*- Makefile -*-
#
#
GNUPLOT Makefile for Cygwin on WinNT and Win95/98/2000
#
#
To compile gnuplot for WinXX:
#
#
- check the beginning of this file settings you may want to change
#
You'll have to tell it where to find the Help Compiler, among other
#
things.
#
- compile the package: go to directory 'gnuplot' and issue the commands
#
make -C src -f ../config/makefile.cyg
#
make install -C src -f ../config/makefile.cyg
#
- resource compiler used is windres.exe in Cygwin
#
- note pdf, png, and gif libraries if used have to be build for Cygwin
#
with -mno-cygwin option
#
- -static used for static linking to libz-w.a and libpng-w.a
#
#
#
************** Begin of Configuration section ************************
#
#
Choose target to compile:
#
1. wgnuplot.exe: The usual Windows GUI for input commands.
#
2. wgnuplot_pipes.exe: The usual Windows GUI with support of pipes, so
#
that e.g. plot '<awk -f preprocess.awk my.dat') or x=system('ls -1')
#
can work. Drawback: wgnuplot_pipes.exe keeps attached to a console (DOS)
#
window it was launched from, or it opens a new one.
#
3. gnuplot.exe: Console mode instead of GUI for the text input.
#
#
Comment for programs using gnuplot as their plotting engine:
#
Both wgnuplot*.exe compile also pgnuplot.exe. This small helper program was
#
used when gnuplot.exe was not available on Windows. Nowadays, pgnuplot.exe
#
is deprecated -- please use gnuplot.exe instead.
TARGET
=wgnuplot.exe
#
TARGET=wgnuplot_pipes.exe
#
TARGET=gnuplot.exe
#
Comment out the definition lines to disable the according features:
#
GIF, PNG, JPEG device drivers
#
Requires gd library. There are two possibilities how to configure these
#
drivers for use in gnuplot, depending on the gd version. See README.1ST for
#
more details.
#
#
You should compile gnuplot with GD library v2.0 or newer.
#
This library writes PNG, GIF and JPEG images.
#
If libgd has been compiled with TrueType font support, then you can use
#
scaled TrueType fonts in png images. If not, then uncomment FREETYPE.
#
Requires GD, PNG and Z libraries, optionally libfreetype.
#
NEWGD
=1
JPEG
=1
FREETYPE
=1
#
PDF device driver
#
requires PNG and Z libraries based on particular PDF library used
#
PDF=1
#
DEBUGging support
#
creates binaries suitable for debugging. Some bugs may come and go
#
as opposed to a production build since we lower the optimization level
#
DEBUG=1
#
MOUSE support for the windows terminal
MOUSE
=1
#
Below you can adapt paths according to your software setup:
#
Where to place gnuplot.gih helpfile:
HELPFILE
= wgnuplot.hlp
#
Where to install the PostScript prologue files, relatively to the executable
#
wgnuplot.exe
GNUPLOT_PS_DIR
= share/PostScript
#
Similarly for javascript files for the canvas terminal:
GNUPLOT_JS_DIR
= share/js
#
Similarly for lua scripts used by the lua terminal
GNUPLOT_LUA_DIR
= share/lua
#
Destination directory, used in 'make install':
DESTDIR
= /cygdrive/c/Apps/gnuplot
#
give here the path to Gygwin GCC compiler unless it is already in PATH
#
GCCPATH = /bin/
#
GCCPATH =
#
Do you want some special optimization?
CFLAGS
=
#
To compile the .hlp file you need hcw either out of Microsoft SDK or MS Help
#
Workshop. The latter can be obtained at www.helpmaster.com/help/devaids.htm.
#
Put the path to hcw here unless it is already in PATH:
HCWPATH
= /cygdrive/c/Program\ Files/Help\ Workshop/
HCW
=
$(
HCWPATH
)
hcw
#
Switches are for HCW 4.03:
HCWFLAG
=
#
Choose which windres/rc do you want to use (GNU windres or MS RC):
GNU_RC
= 1
ifndef
GNU_RC
#
If uncommented GNU_RC above and rc.exe not in PATH, then set:
MSSDK
= c:/mssdk
endif
#
GNU sort
#
GNUSORT = gsort.exe
GNUSORT
= /usr/bin/sort
#
#
*************** End of Configuration section *************************
#
#
There shouldn't be anything to be changed below this line
#
**********************************************************************
#
#
PIPES: define if you would prefer support of pipes undef Windows (e.g.
#
plot '<awk -f preprocess.awk my.dat'). Drawback: wgnuplot_pipes.exe keeps
#
attached to a console=DOS window it was launched from, or it opens a new one.
#
Note: Maybe it does not work properly with pgnuplot (not tested recently).
#
CONSOLE: define if you would prefer the console (non-GUI) version of the
#
text command window.
#
Set PGNUPLOT, PIPES and CONSOLE according to the target
ifeq
(
$(
TARGET
)
,wgnuplot.exe)
PGNUPLOT=pgnuplot.exe
endif
ifeq
(
$(
TARGET
)
,wgnuplot_pipes.exe)
PGNUPLOT=pgnuplot.exe
PIPES=1
endif
ifeq
(
$(
TARGET
)
,gnuplot.exe)
PIPES=1
CONSOLE=1
endif
CC
=
$(
GCCPATH
)
gcc
LD
=
$(
GCCPATH
)
gcc
RM
= rm -f
CP
= cp -p
ifdef
DEBUG
CFLAGS
+= -g
LDFLAGS
+= -g
else
CFLAGS
+= -O2
LDFLAGS
+= -s
endif
ifdef
PIPES
OPTS
+= -DPIPES
LDFLAGS2
= -mconsole
endif
ifdef
CONSOLE
OPTS
+= -DWGP_CONSOLE
LDFLAGS2
= -mconsole
endif
TOP
= ..
TERMFLAGS
= -DGNUPLOT_PS_DIR=\"
$(
GNUPLOT_PS_DIR
)
\" -DGNUPLOT_JS_DIR=\"
$(
GNUPLOT_JS_DIR
)
\"
TERMFLAGS
+= -DGNUPLOT_LUA_DIR=\"
$(
GNUPLOT_LUA_DIR
)
\" -I
$(
TOP
)
/term
TERMLIBS
=
CFLAGS
+= -I. -D_Windows -DCYGWIN -mno-cygwin -DHAVE_CONFIG_H
\
$(
OPTS
)
#
-I/usr/local/include
ifdef
MOUSE
CFLAGS
+= -DUSE_MOUSE=1 -DWIN_IPC
endif
ifdef
NEWGD
GD
=1
PNG
=1
endif
ifdef
GD
CFLAGS
+= -DHAVE_LIBGD
TERMLIBS
+= -lgd
endif
ifdef
PNG
CFLAGS
+= -DHAVE_LIBPNG
TERMLIBS
+= -lpng -lz
endif
ifdef
NEWGD
CFLAGS
+= -DHAVE_GD_GIF -DGIF_ANIMATION -DHAVE_GD_PNG
ifdef
JPEG
CFLAGS
+= -DHAVE_GD_JPEG
TERMLIBS
+= -ljpeg
endif
ifdef
FREETYPE
CFLAGS
+= -DHAVE_GD_TTF
TERMLIBS
+= -lfreetype
endif
endif
ifdef
PDF
CFLAGS
+= -DHAVE_LIBPDF
TERMLIBS
+= -lpdf-w -ltiff-w
ifndef
PNG
NEED_PNG_W
= 1
else
ifndef
NEWGD
NEED_PNG_W
= 1
endif
endif
ifdef
NEED_PNG_W
CFLAGS
+= -DHAVE_LIBPNG
TERMLIBS
+= -lpng-w -lz-w
endif
endif
ifdef
GNU_RC
#
RC = /bin/windres
RC
=
$(
GCCPATH
)
windres
RCFLAGS
= --include-dir win
\
--define __WIN32__ --define __WIN95__ --define MSRC
\
--define __GNUWIN32__ --define WIN32
RCOUT
= wgplt_res.
$(
O
)
RES2COFF
= echo wgplt_res.
$(
O
)
else
RC
=
$(
MSSDK
)
/bin/rc
RCFLAGS
= -v -i
$(
MSSDK
)
/include -iwin
\
-dWIN32 -dMSRC
RCOUT
= -fowgnuplot.res
RES2COFF
= res2coff -i wgnuplot.res -o wgplt_res.
$(
O
)
endif
#
macros for makefile.all
O
=o
T
=../term/
D
=../docs/
L
=docs/latex/
M
=../demo/
default
:
$(
TARGET
)
$(
HELPFILE
)
wgnuplot.mnu
$(
M
)
bf_test.exe
$(
PGNUPLOT
)
all
: default gnuplot.ps gnuplot.pdf
#
include the 'core makefile template'
include
makefile.all
OBJS
=
$(
COREOBJS
)
version.
$(
O
)
gpexecute.
$(
O
)
WINOBJS
= winmain.
$(
O
)
wgnuplib.
$(
O
)
wgraph.
$(
O
)
wprinter.
$(
O
)
wtext.
$(
O
)
\
wpause.
$(
O
)
wmenu.
$(
O
)
WINDOWS
= makefile.win makefile.nt README.win win/wcommon.h
\
win/wgnuplib.c win/wgnuplib.h win/wgnuplib.rc
\
win/wgnuplot.mnu win/wgraph.c
\
win/winmain.c win/wmenu.c win/wpause.c win/wprinter.c
\
win/wresourc.h win/wtext.c win/wtext.h win/geticon.c
\
$(
T
)
win.trm win/grpicon.ico win/texticon.ico
#
default rules
.SUFFIXES
: .exe .o .c
.c.o
:
$(
CC
)
-c
$(
CFLAGS
)
$*
.c
LDLIBS
= -L/usr/local/lib -lkernel32 -lgdi32
$(
TARGET
)
:
$(
OBJS
)
$(
WINOBJS
)
wgplt_res.
$(
O
)
texticon.ico grpicon.ico
$(
LD
)
$(
LDFLAGS
)
$(
LDFLAGS2
)
-mwindows -mno-cygwin -o
$@
\
$(
OBJS
)
$(
WINOBJS
)
wgplt_res.
$(
O
)
$(
LDLIBS
)
$(
TERMLIBS
)
$(
PGNUPLOT
)
: win/pgnuplot.c version.
$(
O
)
gcc -O2 -s -mno-cygwin -DWINDOWS_NO_GUI -DHAVE_STDBOOL_H -o
$@
\
win/pgnuplot.c version.
$(
O
)
-I. -luser32
#
Rules:
wgplt_res.
$(
O
)
: win/wgnuplot.rc win/wgnuplib.rc win/wresourc.h texticon.ico grpicon.ico
$(
RC
)
$(
RCFLAGS
)
win/wgnuplot.rc
$(
RCOUT
)
--include-dir=win
$(
RES2COFF
)
show.
$(
O
)
: show.c plot.h setshow.h
$(
CC
)
-c
$(
CFLAGS
)
-DHELPFILE=
\"
$(
HELPFILE
)
\"
-DBINDIR=
\"
$(
bindir
)
\"
$<
term.
$(
O
)
: term.c term.h plot.h setshow.h bitmap.h
$(
CORETERM
)
$(
CC
)
-c
$(
CFLAGS
)
$(
TERMFLAGS
)
$<
version.
$(
O
)
: version.c
WINDEPS
= win/wgnuplib.h win/wcommon.h win/wresourc.h
winmain.
$(
O
)
: win/winmain.c win/wgnuplib.h win/wtext.h plot.h
$(
CC
)
-c
$(
CFLAGS
)
-DHELPFILE=
\"
$(
HELPFILE
)
\"
win/winmain.c
wgnuplib.
$(
O
)
: win/wgnuplib.c
$(
WINDEPS
)
$(
CC
)
-c
$(
CFLAGS
)
win/wgnuplib.c
wmenu.
$(
O
)
: win/wmenu.c
$(
WINDEPS
)
$(
CC
)
-c
$(
CFLAGS
)
win/wmenu.c
wtext.
$(
O
)
: win/wtext.c
$(
WINDEPS
)
$(
CC
)
-c
$(
CFLAGS
)
win/wtext.c
wpause.
$(
O
)
: win/wpause.c
$(
WINDEPS
)
$(
CC
)
-c
$(
CFLAGS
)
win/wpause.c
wprinter.
$(
O
)
: win/wprinter.c
$(
WINDEPS
)
$(
CC
)
-c
$(
CFLAGS
)
win/wprinter.c
wgraph.
$(
O
)
: win/wgraph.c
$(
WINDEPS
)
$(
CC
)
-c
$(
CFLAGS
)
win/wgraph.c
wgnuplot.mnu
: win/wgnuplot.mnu
$(
CP
)
$^
$@
#
extract icons from wgnuplot.rc
texticon.ico
: grpicon.ico
grpicon.ico
: geticon.exe win/wgnuplot.rc
./geticon win/wgnuplot.rc
geticon.exe
: win/geticon.c
$(
LD
)
$(
LDFLAGS
)
-o
$@
win/geticon.c
#
make binary demo files
$(
M
)
bf_test.exe
: bf_test.c alloc.
$(
O
)
$(
LD
)
$(
LDFLAGS
)
$(
CFLAGS
)
-DWINDOWS_NO_GUI -o
$@
$^
(cd ../demo
;
./bf_test.exe )
#
#
Create config.h
#
$(
OBJS
)
$(
WINOBJS
)
: config.h
config.h
: ../config/config.cyg
cp -p
$<
$@
#
Create documentation in various formats
#
ALL_TERMINALS_DOC
=1
ifdef
ALL_TERMINALS_DOC
#
Generate TeX documentation with the complete list of all terminals
#
(gnuplot.tex should be the same on all platforms):
SORT_TERMINALS
=1
ifdef
SORT_TERMINALS
#
sort alphabetically all terminals (note: req. GNU sort, not from MS)
allterm.h
:
$(
CORETERM
)
@echo
"
Building allterm.h
"
@for e
in
`
grep -E
"
^[ ]*START_HELP
"
$(
CORETERM
)
|
\
$(
GNUSORT
)
-f -t
'
:
'
-k2
`
;
do
\
f=
`
echo
$$
e
|
cut -d
\:
-f1
`
;
s=
`
echo
$$
e
|
cut -d
\:
-f2
`
;
\
sed -n
"
/^[ ]*
$$
s/,/^[ ]*END_HELP/p
"
$$
f
;
\
done
>
$@
else
#
sequence of terminals according to "ls term/*.trm":
allterm.h
:
$(
CORETERM
)
@echo
"
Building allterm.h
"
@cat ../term/
*
.trm
>
allterm.c
$(
CPP
)
$(
CFLAGS
)
-I$../term -DTERM_DRIVER_H -DTERM_HELP allterm.c
|
\
sed
'
/^ *$$/d;/^#/d
'
>
allterm.h
@rm -f allterm.c
endif
doc2tex.exe
:
$(
D
)
doc2tex.c
$(
D
)
termdoc.c allterm.h
$(
LD
)
$(
LDFLAGS
)
-o
$@
-DWINDOWS_NO_GUI -DALL_TERM_DOC
$(
CFLAGS
)
-I. -I
$(
D
)
-I../term -I
$(
T
)
$(
D
)
doc2tex.c
$(
D
)
termdoc.c
else
#
Old version: generate documentation with only currently used terminals:
doc2tex.exe
:
$(
D
)
doc2tex.c
$(
D
)
termdoc.c
$(
LD
)
$(
LDFLAGS
)
-o
$@
-DWINDOWS_NO_GUI
$(
CFLAGS
)
-I. -I
$(
D
)
-I
$(
T
)
$^
endif
gnuplot.tex
:
$(
D
)
gnuplot.doc doc2tex.exe
doc2tex
$(
D
)
gnuplot.doc gnuplot.tex
#
Call LaTeX three times to get the toc right.
gnuplot.dvi
: gnuplot.tex
$(
D
)
titlepag.tex
cp gnuplot.tex
$(
D
)
gp_tex2.tex
cd
$(
D
)
&&
latex gp_tex2.tex
&&
latex gp_tex2.tex
&&
latex gp_tex2.tex
mv
$(
D
)
gp_tex2.dvi gnuplot.dvi
rm -f
$(
D
)
gp_tex2.
*
gnuplot.ps
: gnuplot.dvi
dvips -o gnuplot.ps gnuplot.dvi
gnuplot.pdf
: gnuplot.tex
$(
D
)
titlepag.tex
cp gnuplot.tex
$(
D
)
gp_tex2.tex
cd
$(
D
)
&&
pdflatex gp_tex2.tex
&&
pdflatex gp_tex2.tex
\
&&
pdflatex gp_tex2.tex
mv
$(
D
)
gp_tex2.pdf gnuplot.pdf
rm -f
$(
D
)
gp_tex2.
*
#
clean up temporary files
clean
:
$(
RM
)
config.h
*
.
$(
O
)
wgnuplot.map wgnuplot.res win/gnuplot.rtf
$(
RM
)
win/wgnuplib.res wgnuplib.map wgnuplot.lib
$(
RM
)
$(
M
)
bf_test.exe
*
.ico geticon.exe allterm.h allterm.c
$(
RM
)
gnuplot.tex gnuplot.dvi gnuplot.ps gnuplot.pdf
realclean
: veryclean
veryclean
: clean
$(
RM
)
wgnuplot.exe wgnuplot_pipes.exe gnuplot.exe pgnuplot.exe
$(
RM
)
wgnuplot.hlp wgnuplot.gid
$(
RM
)
$(
M
)
binary[123]
$(
M
)
fit.log
$(
M
)
soundfit.par
#
now move the whole stuff to its destination
install
: default
mkdir -p
$(
DESTDIR
)
cp gnuplot.exe
$(
DESTDIR
)
/gnuplot.exe
cp wgnuplot.exe
$(
DESTDIR
)
/wgnuplot.exe
cp wgnuplot_pipes.exe
$(
DESTDIR
)
/wgnuplot_pipes.exe
cp pgnuplot.exe
$(
DESTDIR
)
/pgnuplot.exe
cp win/wgnuplot.mnu
$(
DESTDIR
)
/wgnuplot.mnu
cp wgnuplot.hlp
$(
DESTDIR
)
/wgnuplot.hlp
mkdir -p
$(
DESTDIR
)
/
$(
GNUPLOT_PS_DIR
)
cp ../term/PostScript/
*
.ps
$(
DESTDIR
)
/
$(
GNUPLOT_PS_DIR
)
mkdir -p
$(
DESTDIR
)
/
$(
GNUPLOT_LUA_DIR
)
cp ../term/lua/
*
$(
DESTDIR
)
/
$(
GNUPLOT_LUA_DIR
)
mkdir -p
$(
DESTDIR
)
/
$(
GNUPLOT_JS_DIR
)
cp ../term/js/
*
$(
DESTDIR
)
/
$(
GNUPLOT_JS_DIR
)
Back
|
FazBrowse Home
|
New Git URL