2 # $Id: makefile.wc,v 1.7 2005/04/28 20:33:22 broeker Exp $
4 # GNUPLOT Makefile for Watcom C
6 # Modified from the TurboC makefile by Aurel Gabris
7 # Heavily modified and updated for OpenWatcom 1.2 by HBB
9 # the makefile does longer depends on a linker options file.
10 # this file will be created as needed. (AL 07/17/92)
12 # where to place gnuplot.gih helpfile
13 HELPFILE = gnuplot.gih
15 # names of C compiler & tools
22 ! loaddll wccaxp wccdaxp
23 ! loaddll wcc386 wccd386
25 ! loaddll wppaxp wppdaxp
26 ! loaddll wpp386 wppd386
31 # the memory model to use (f = flat)
34 # definitions used by makefile.all (and elsewhere)
42 # -DHAVE_CONFIG_H: do the configuration #defines the (now) usual way
43 # -DREADLINE to use the history/line editing capability. If you want this
44 # capability add -DREADLINE to CFLAGS
45 # -DLITE means no hiddenline removal to conserve memory
46 CPPFLAGS=-DHAVE_CONFIG_H -UMSDOS -DDOS386 -DDOS386 -DDOS32 -DPC
48 # -w0 means ignore warnings and do not report them
49 # -d1{+} means include line numbers for debugger
50 # -d2 means full symbolic debug info
51 # -fpi means inline 80x87 instructions with emulation
52 # -fpi87 means inline 80x87 instructions
53 # -zq avoids all the version banners being printed
54 # -zm puts each function in a separate section to allow dead code elimination
55 # -o{x} controls optimization
56 # a -> relax aliasing constraints
57 # f -> generate traceable stack frames as needed
58 # The selection of the optimization flags include some wizardry.
59 # Thus omiting any flags from the above two, may result in run-time
61 # m -> generate inline 80x87 code for math functions
62 # d -> disable all optimizations (Watch out!)
63 # option {stack=n} sets stack size to n
64 CFLAGS = -zq -m$(MODEL) -d2 -zm -omaf -fpi -fp3 -I. $(CPPFLAGS)
65 DOC2XXX_FLAGS = -I$(D) -I$(T) $(CFLAGS)
68 OBJS = $(COREOBJS) version.$(O)
70 BINFILES = $(M)binary1 $(M)binary2 $(M)binary3
72 all: gnuplot.exe $(HELPFILE) $(BINFILES) .SYMBOLIC
75 # use linkopt.wc to avoid command-line overflow
77 gnuplot.exe: config.h $(OBJS) .PRECIOUS
97 $(OBJS): config.h .AUTODEPEND
99 config.h: ..\config\config.wc
102 makefile.wc: ..\config\makefile.wc
105 term.obj: term.c term.h plot.h bitmap.h $(CORETERM) .AUTODEPEND
106 $(CC) $(CFLAGS) $(TERMFLAGS) -DDEFAULTTERM="dospc" -I$(T) term.c
108 # convert gnuplot.doc to gnuplot.gih
109 $(HELPFILE): doc2gih.exe $(D)gnuplot.doc
110 doc2gih $(D)gnuplot.doc $(HELPFILE)
112 doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c .AUTODEPEND
113 $(CL) $(DOC2XXX_FLAGS) -fe=$^@ $<
115 doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c .AUTODEPEND
116 $(CL) -w0 -m$(MODEL) $(DOC2XXX_FLAGS) -DALL_TERM_DOC -fe=$^@ $<
118 bf_test.exe: bf_test.c binary.obj alloc.obj .AUTODEPEND
119 $(CC) $(CPPFLAGS) -m$(MODEL) bf_test.c
120 $(LINK) system dos4g name bf_test file {bf_test binary alloc}
122 $(BINFILES): bf_test.exe
126 # clean target - remove all temp files, but leave executable intact
127 # needed when changing configuration (model or overlaying)
130 if exist *.obj del *.obj
131 if exist *.err del *.err
132 if exist linkopt.wc del linkopt.wc
133 if exist doc2gih.exe del doc2gih.exe
134 if exist doc2tex.exe del doc2tex.exe
135 if exist bf_test.exe del bf_test.exe
136 if exist gnuplot.map del gnuplot.map
137 if exist gnuplot.sym del gnuplot.sym
139 # realclean target - remove all files created by the makefile
141 realclean: clean .SYMBOLIC
142 if exist gnuplot.exe del gnuplot.exe
143 if exist gnuplot.gih del gnuplot.gih
144 if exist $(M)binary? del $(M)binary?
145 if exist config.h del config.h
146 if exist makefile.wc del makefile.wc