# 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) @<