Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.wc
1 #
2 # $Id: makefile.wc,v 1.7 2005/04/28 20:33:22 broeker Exp $
3 #
4 # GNUPLOT Makefile for Watcom C
5 #
6 # Modified from the TurboC makefile by Aurel Gabris
7 # Heavily modified and updated for OpenWatcom 1.2 by HBB
8 #
9 # the makefile does longer depends on a linker options file.
10 # this file will be created as needed.                          (AL 07/17/92)
11
12 # where to place gnuplot.gih helpfile
13 HELPFILE = gnuplot.gih
14
15 # names of C compiler & tools
16 CC = wcc386
17 CL = wcl386
18 LINK = wlink
19
20 !ifdef __LOADDLL__
21 !  loaddll wcc      wccd
22 !  loaddll wccaxp   wccdaxp
23 !  loaddll wcc386   wccd386
24 !  loaddll wpp      wppdi86
25 !  loaddll wppaxp   wppdaxp
26 !  loaddll wpp386   wppd386
27 !  loaddll wlink    wlink
28 !  loaddll wlib     wlibd
29 !endif
30
31 # the memory model to use (f = flat)
32 MODEL = f
33
34 # definitions used by makefile.all (and elsewhere)
35 T=..\term\
36 D=..\docs\
37 O=obj
38 M=..\demo\
39
40 !include makefile.awc
41
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
47
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
60 #           errors.
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) 
66 TERMFLAGS =
67
68 OBJS = $(COREOBJS) version.$(O)
69
70 BINFILES = $(M)binary1 $(M)binary2 $(M)binary3
71
72 all: gnuplot.exe $(HELPFILE) $(BINFILES) .SYMBOLIC
73         @%null
74
75 # use linkopt.wc to avoid command-line overflow
76
77 gnuplot.exe: config.h $(OBJS) .PRECIOUS
78         $(LINK) @<<linkopt.wc
79 system dos4g 
80 OPTION stack=100000
81 DEBUG WATCOM ALL
82 OPTION SYMFILE
83 OPTION MAP
84 OPTION ELIMINATE
85 OPTION QUIET
86 NAME gnuplot 
87 file {
88 $(OBJS)
89 }
90 <<
91
92 # default rules
93
94 .c.obj: .AUTODEPEND
95         $(CC) $^& $(CFLAGS)
96
97 $(OBJS): config.h .AUTODEPEND
98
99 config.h: ..\config\config.wc
100         copy $< $^@
101
102 makefile.wc: ..\config\makefile.wc
103         copy $< $^@
104
105 term.obj: term.c term.h plot.h bitmap.h $(CORETERM) .AUTODEPEND
106         $(CC) $(CFLAGS) $(TERMFLAGS) -DDEFAULTTERM="dospc" -I$(T) term.c
107
108 # convert gnuplot.doc to gnuplot.gih
109 $(HELPFILE): doc2gih.exe $(D)gnuplot.doc
110         doc2gih $(D)gnuplot.doc $(HELPFILE)
111
112 doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c .AUTODEPEND
113         $(CL) $(DOC2XXX_FLAGS) -fe=$^@ $<
114
115 doc2tex.exe: $(D)doc2tex.c $(D)termdoc.c .AUTODEPEND
116         $(CL) -w0 -m$(MODEL) $(DOC2XXX_FLAGS) -DALL_TERM_DOC -fe=$^@ $<
117
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}
121
122 $(BINFILES): bf_test.exe
123         .\bf_test
124         move binary? ..\demo
125
126 # clean target - remove all temp files, but leave executable intact
127 # needed when changing configuration (model or overlaying)
128
129 clean: .SYMBOLIC
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
138
139 # realclean target - remove all files created by the makefile
140
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