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
|
# Hello, emacs: this is a -*- Makefile -*-
# $Id: Makefile,v 1.13 2014/08/18 03:49:06 sfeam Exp $
#
# GNUPLOT Makefile OpenWatcom 1.3 on Win32
# To compile:
# Either, from ..\src:
# wmake -f ..\config\makefile.oww
# or copy this file to ..\src, edit it to your liking, then
# from ..\src:
# wmake -f makefile.oww
#
# History of this file:
# 2004-02-23: Created by massive editing of makefile.nt (and config.nt)
# 2004-04-25: Removed all remaining MS-isms (by peeking at how OW's
# MS namesake replacement tools generate their command lines)
#
# enable exactly one of these:
VARIANT = PLAIN
#VARIANT = PIPES
#VARIANT = CONSOLE
TOP = ..\..
# Programs:
# The Microsoft Help compiler:
HCW = "c:\program files\help workshop\hcw.exe"
# ... and the HTML help compiler
HHC_DIR = c:\Program Files\HTML Help Workshop
HHC = "$(HHC_DIR)\hhc.exe"
# OpenWatcom programs:
WCL = wcl386
WCC = wcc386
WLD = wlink
WRC = wrc
# Speed up compilation a bit by running the compiler as a DLL from
# inside wmake:
!ifdef __LOADDLL__
! loaddll wcc wccd
! loaddll wccaxp wccdaxp
! loaddll wcc386 wccd386
! loaddll wpp wppdi86
! loaddll wppaxp wppdaxp
! loaddll wpp386 wppd386
! loaddll wlink wlinkd
! loaddll wlib wlibd
!endif
# Where to install the PostScript prologue files, relatively to the executable
# wgnuplot.exe
GNUPLOT_PS_DIR = share/PostScript
# paths for external libs added here...
LDLIBS =
# Macros for makefile.all
O=obj
T=$(TOP)\term\
D=$(TOP)\docs\
M=$(TOP)\demo\
S=$(TOP)\src
W=$(S)\win
BINARYFILES=$(M)binary1 $(M)binary2 $(M)binary3
# compiler flags:
#
# Defines
CPPFLAGS = -DHAVE_CONFIG_H -D_Windows -DHAVE_CONFIG_H -DUSE_MOUSE -DEAM_OBJECTS
# library-dependent ones may have to be added, like:
# -DHAVE_LIBPNG -DHAVE_LIBPDF
HELPFILE = wgnuplot.chm
DEFAULT_TARGETS = $(BINARYFILES) $(HELPFILE)
TARGETS_PLAIN=wgnuplot.exe wgnuplot.mnu
EXTRA_CPPFLAGS_PLAIN =
TARGETS_PIPES=wgnuplot_pipes.exe wgnuplot.mnu
EXTRA_CPPFLAGS_PIPES = -DPIPES=1
TARGETS_CONSOLE=gnuplot.exe
EXTRA_CPPFLAGS_CONSOLE = -DPIPES=1 -DWGP_CONSOLE
ALL_TARGETS = $(DEFAULT_TARGETS) $(TARGETS_PLAIN) $(TARGETS_PIPES) $(TARGETS_CONSOLE)
DEFAULT_TARGETS += $(TARGETS_$(VARIANT))
LDLIBS += LIBRARY htmlhelp.lib
# compiler flags, determined from MS ones by OW's "cl /showwopts"
# -c : don't link
# -I : add directory to include search path
# -zq : don't show a version banner message
# -5r : P5-optimized, 386-compatible code, register calling convention
# -zm : put each function in its own section to improve dead code elimination
# -bm : target multi-threaded environment
# -sg : grow the stack if needed
# -zlf: store library usage in .obj files
# -ei : force sizeof(enum) >= sizeof(int)
# -o : optimization options:
# r: reorder for pipelining
# i: inline intrinsics
# l: loop optimizations
# t: optimize for speed
# -j : char is signed
# -aa : allow non-const initializers for locals
# -d2 : debug information
WCFLAGS = -zlf -ei -zq -I$(S);$(W) -zm -bm -5r -sg -orilt -j -aa -d2 $(CPPFLAGS) $(OPTS)
# removed: -za99
# ...and here.
# see other terminal defines in term.h
TERMFLAGS = -DGNUPLOT_PS_DIR="$(GNUPLOT_PS_DIR)" -I$(T)
# Note: like makefile.wc, this need the special Watcom-style version of
# makefile.all, because line continuation in WMake is different...
!INCLUDE $(S)\makefile.awc
default: $(DEFAULT_TARGETS) .SYMBOLIC
all: $(ALL_TARGETS) .SYMBOLIC
WINOBJS = winmain.$(O) wgnuplib.$(O) wgraph.$(O) wprinter.$(O) wtext.$(O) &
wpause.$(O) wmenu.$(O) gpexecute.$(O) screenbuf.$(O)
OBJS = $(COREOBJS) version.$(O) $(WINOBJS)
O=cobj
CONSOLE_OBJS = $+ $(OBJS) $-
O=pobj
PIPE_OBJS = $+ $(OBJS) $-
O=obj
WIN_EXTRA_INPUTS = wgnuplot.res
# extensions:
.EXTENSIONS:
.EXTENSIONS: .exe .cobj .pobj .obj .asm .pas .c .cpp .for
.c: $(S);$(W)
# default rule
.c.obj: .AUTODEPEND
$(WCC) $(WCFLAGS) $[@
.c.cobj: .AUTODEPEND
$(WCC) $(EXTRA_CPPFLAGS_CONSOLE) $(WCFLAGS) $[@ -fo=$^@
.c.pobj: .AUTODEPEND
$(WCC) $(EXTRA_CPPFLAGS_PIPES) $(WCFLAGS) $[@ -fo=$^@
# file-specific rules
wgnuplot.exe: $(OBJS) $(WIN_EXTRA_INPUTS)
$(WLD) @<<linkopt1.oww $(LDLIBS)
RUNTIME windows=4.0
SYSTEM nt_win
DEBUG ALL
OPTION quiet
FILE {
$(OBJS)
}
LIBRARY kernel32.lib,user32.lib,gdi32.lib,winspool.lib,comdlg32.lib
LIBRARY comctl32.lib,advapi32.lib,shell32.lib
LIBRARY msimg32.lib
OPTION map
OPTION SYMFILE
NAME $^&
OPTION stack=1M
OPTION resource=wgnuplot.res
OPTION ELIMINATE
REFERENCE _wstart_
OPTION START=_wstart_
<<
wgnuplot_pipes.exe: $(PIPE_OBJS) $(WIN_EXTRA_INPUTS)
$(WLD) @<<linkopt1.oww $(LDLIBS)
RUNTIME windows=4.0
SYSTEM nt_win
DEBUG ALL
OPTION quiet
FILE {
$(PIPE_OBJS)
}
LIBRARY kernel32.lib,user32.lib,gdi32.lib,winspool.lib,comdlg32.lib
LIBRARY advapi32.lib,shell32.lib
LIBRARY msimg32.lib
OPTION map
OPTION SYMFILE
NAME $^&
OPTION stack=1M
OPTION resource=wgnuplot.res
OPTION ELIMINATE
REFERENCE _wstart_
OPTION START=_wstart_
<<
gnuplot.exe: $(CONSOLE_OBJS) $(WIN_EXTRA_INPUTS)
$(WLD) @<<linkopt1.oww $(LDLIBS)
RUNTIME console=4.0
SYSTEM nt
DEBUG ALL
OPTION quiet
FILE {
$(CONSOLE_OBJS)
}
LIBRARY kernel32.lib,user32.lib,gdi32.lib,winspool.lib,comdlg32.lib
LIBRARY advapi32.lib,shell32.lib
LIBRARY msimg32.lib
OPTION map
OPTION SYMFILE
NAME gnuplot.exe
OPTION stack=1M
OPTION resource=wgnuplot.res
OPTION ELIMINATE
#REFERENCE _wstart_
#OPTION START=_wstart_
<<keep
# NOTE: Unknown what /l 0x409 does in MS RC call --- seems to work without, though
wgnuplot.res : $(W)\wgnuplot.rc $(W)\wgnuplib.rc &
$(W)\wresourc.h $(W)\texticon.ico $(W)\grpicon.ico
$(WRC) -r -q -bt=nt -fowgnuplot.res -i=$(W) &
-d_WIN32 -dNDEBUG -dWIN32 $(W)\wgnuplot.rc
term.obj: $(S)\term.c $(CORETERM) .AUTODEPEND
$(WCC) $(WCFLAGS) $(TERMFLAGS) $[@
term.cobj: $(S)\term.c $(CORETERM) .AUTODEPEND
$(WCC) $(EXTRA_CPPFLAGS_CONSOLE) $(WCFLAGS) $(TERMFLAGS) $[@ -fo=$^@
term.pobj: $(S)\term.c $(CORETERM) .AUTODEPEND
$(WCC) $(EXTRA_CPPFLAGS_PIPES) $(WCFLAGS) $(TERMFLAGS) $[@ -fo=$^@
wgnuplot.mnu: $(W)\wgnuplot.mnu
copy $(W)\wgnuplot.mnu wgnuplot.mnu
pgnuplot.exe: $(W)\pgnuplot.c version.$(O) .AUTODEPEND
$(WCL) -DWINDOWS_NO_GUI -5r -zq -d2 -fm $(W)\pgnuplot.c -fe=pgnuplot.exe -I$(S) &
version.$(O) user32.lib
WD=$(D)windows\
HHP_PROJ=$(WD)wgnuplot.hhp
HHP_CONTENT=$(WD)wgnuplot.hhc
HHP_INPUT=$(WD)wgnuplot.html
HHP_OUTPUT=$(WD)wgnuplot.chm
wgnuplot.chm: $(HHP_OUTPUT)
copy $(HHP_OUTPUT) .
$(HHP_OUTPUT): $(HHP_PROJ) $(HHP_INPUT) $(HHP_CONTENT)
-$(HHC) $(HHP_PROJ)
$(HHP_INPUT) $(HHP_CONTENT): doc2html.exe $(D)gnuplot.doc
doc2html $(D)gnuplot.doc $(WD)
doc2html.exe: $(WD)doc2html.c $(D)termdoc.c $(D)xref.c version.$(O) .AUTODEPEND
$(WCL) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI -I$(D);$(T) -fe$^@ $(WD)doc2html.c $(D)termdoc.c $(D)xref.c version.$(O)
gnuplot.gih: doc2gih.exe $(D)gnuplot.doc
doc2gih $(D)gnuplot.doc $^@
doc2gih.exe: $(D)doc2gih.c $(D)termdoc.c $(D)xref.c .AUTODEPEND
$(WCL) $(EXTRA_CPPFLAGS_CONSOLE) $(WCFLAGS) -w1 -I$(D);$(T) -fe$^@ $(D)doc2gih.c $(D)termdoc.c $(D)xref.c
#make binary demo files
# WINDOWS_NO_GUI makes sure that wtext.h does not redefine fread() etc.
bf_test.exe : bf_test.c .AUTODEPEND
$(WCL) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI -fe$^@ $(S)\bf_test.c
$(BINARYFILES): bf_test.exe
.\bf_test
move binary? $(M).
dbinary.$(O): $(S)\binary.c
$(WCC) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI -fodbinary.$(O) $[@
# clean up temporary files
clean: .SYMBOLIC
rm -f *.obj *.cobj *.pobj *.err
rm -f wgnuplot.res $(W)\gnuplot.rtf $(W)\wgnuplot.hlp
rm -f bf_test.exe linkopt1.oww doc2html.exe
rm -f doc2gih.exe gnuplot.gih
rm -f *.map *.sym wgnuplot.gid
realclean: clean .SYMBOLIC
rm -f wgnuplot.exe wgnuplot.mnu pgnuplot.exe gnuplot.exe wgnuplot_pipes.exe
rm -f $(HHP_CONTENT) $(HHP_INPUT) $(HHP_OUTPUT) $(WD)wgnuplot.log
rm -f wgnuplot.hlp wgnuplot.chm wgnuplot.chw
rm -f $(D)binary[123] $(D)fit.log $(D)soundfit.par
|