File: makefile.wc

package info (click to toggle)
gnuplot 4.6.6-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 15,640 kB
  • sloc: ansic: 85,383; cpp: 6,743; lisp: 3,999; makefile: 2,126; sh: 976; objc: 647; asm: 539; perl: 310; awk: 235; pascal: 194; csh: 179; tcl: 88; python: 46
file content (145 lines) | stat: -rw-r--r-- 4,045 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
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
#
# $Id: makefile.wc,v 1.8 2010/03/14 06:43:17 sfeam Exp $
#
# GNUPLOT Makefile for Watcom C
#
# Modified from the TurboC makefile by Aurel Gabris
# Heavily modified and updated for OpenWatcom 1.2 by HBB
#
# the makefile does longer depends on a linker options file.
# this file will be created as needed.                          (AL 07/17/92)

# where to place gnuplot.gih helpfile
HELPFILE = gnuplot.gih

# names of C compiler & tools
CC = wcc386
CL = wcl386
LINK = wlink

!ifdef __LOADDLL__
!  loaddll wcc      wccd
!  loaddll wccaxp   wccdaxp
!  loaddll wcc386   wccd386
!  loaddll wpp      wppdi86
!  loaddll wppaxp   wppdaxp
!  loaddll wpp386   wppd386
!  loaddll wlink    wlink
!  loaddll wlib     wlibd
!endif

# the memory model to use (f = flat)
MODEL = f

# definitions used by makefile.all (and elsewhere)
T=..\term\
D=..\docs\
O=obj
M=..\demo\

!include makefile.awc

# -DHAVE_CONFIG_H: do the configuration #defines the (now) usual way
# -DREADLINE to use the history/line editing capability. If you want this
#    capability add -DREADLINE to CFLAGS
CPPFLAGS=-DHAVE_CONFIG_H -UMSDOS -DDOS386 -DDOS386 -DDOS32 -DPC

# -w0 means ignore warnings and do not report them
# -d1{+} means include line numbers for debugger
# -d2 means full symbolic debug info
# -fpi means inline 80x87 instructions with emulation
# -fpi87 means inline 80x87 instructions
# -zq avoids all the version banners being printed
# -zm puts each function in a separate section to allow dead code elimination
# -o{x} controls optimization
#      a           -> relax aliasing constraints
#      f           -> generate traceable stack frames as needed
#           The selection of the optimization flags include some wizardry.
#           Thus omiting any flags from the above two, may result in run-time
#           errors.
#      m           -> generate inline 80x87 code for math functions
#      d           -> disable all optimizations (Watch out!)
# option {stack=n} sets stack size to n
CFLAGS = -zq -m$(MODEL) -d2 -zm -omaf -fpi -fp3 -I. $(CPPFLAGS)
DOC2XXX_FLAGS = -I$(D) -I$(T) $(CFLAGS) 
TERMFLAGS =

OBJS = $(COREOBJS) version.$(O)

BINFILES = $(M)binary1 $(M)binary2 $(M)binary3

all: gnuplot.exe $(HELPFILE) $(BINFILES) .SYMBOLIC
	@%null

# use linkopt.wc to avoid command-line overflow

gnuplot.exe: config.h $(OBJS) .PRECIOUS
	$(LINK) @<<linkopt.wc
system dos4g 
OPTION stack=100000
DEBUG WATCOM ALL
OPTION SYMFILE
OPTION MAP
OPTION ELIMINATE
OPTION QUIET
NAME gnuplot 
file {
$(OBJS)
}
<<

# default rules

.c.obj: .AUTODEPEND
	$(CC) $^& $(CFLAGS)

$(OBJS): config.h .AUTODEPEND

config.h: ..\config\config.wc
	copy $< $^@

makefile.wc: ..\config\makefile.wc
	copy $< $^@

term.obj: term.c term.h plot.h bitmap.h $(CORETERM) .AUTODEPEND
	$(CC) $(CFLAGS) $(TERMFLAGS) -DDEFAULTTERM="dospc" -I$(T) term.c

# convert gnuplot.doc to gnuplot.gih
$(HELPFILE): doc2gih.exe $(D)gnuplot.doc
	doc2gih $(D)gnuplot.doc $(HELPFILE)

doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c .AUTODEPEND
	$(CL) $(DOC2XXX_FLAGS) -fe=$^@ $<

doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c .AUTODEPEND
	$(CL) -w0 -m$(MODEL) $(DOC2XXX_FLAGS) -DALL_TERM_DOC -fe=$^@ $<

bf_test.exe: bf_test.c binary.obj alloc.obj .AUTODEPEND
	$(CC) $(CPPFLAGS) -m$(MODEL) bf_test.c
	$(LINK) system dos4g name bf_test file {bf_test binary alloc}

$(BINFILES): bf_test.exe
	.\bf_test
	move binary? ..\demo

# clean target - remove all temp files, but leave executable intact
# needed when changing configuration (model or overlaying)

clean: .SYMBOLIC
	if exist *.obj del *.obj
	if exist *.err del *.err
	if exist linkopt.wc del linkopt.wc
	if exist doc2gih.exe del doc2gih.exe
	if exist doc2tex.exe del doc2tex.exe
	if exist bf_test.exe del bf_test.exe
	if exist gnuplot.map del gnuplot.map
	if exist gnuplot.sym del gnuplot.sym

# realclean target - remove all files created by the makefile

realclean: clean .SYMBOLIC
	if exist gnuplot.exe del gnuplot.exe
	if exist gnuplot.gih del gnuplot.gih
	if exist $(M)binary? del $(M)binary?
	if exist config.h del config.h
	if exist makefile.wc del makefile.wc