Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.oww
diff --git a/config/makefile.oww b/config/makefile.oww
new file mode 100644 (file)
index 0000000..1cc8b5d
--- /dev/null
@@ -0,0 +1,224 @@
+# Hello, emacs: this is a -*- Makefile -*-
+# $Id: makefile.oww,v 1.8.2.1 2006/10/22 12:10:31 broeker 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)
+#
+
+# where to place gnuplot.gih helpfile
+# NOTE: compiled-in location governed by config.oww!
+HELPFILE = wgnuplot.hlp
+
+TOP = .
+
+# Programs: 
+# The Microsoft Help compiler:
+HCW = "c:\program files\help workshop\hcw.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    wlink
+!  loaddll wlib     wlibd
+!endif
+
+# Where to install the PostScript prologue files, relatively to the executable
+# wgnuplot.exe
+GNUPLOT_PS_DIR = share/PostScript
+
+
+
+# compiler flags: 
+#
+# Defines
+
+CPPFLAGS =  -D_Windows -DHAVE_CONFIG_H -DUSE_MOUSE -DEAM_OBJECTS
+# library-dependent ones may have to be added, like:
+# -DHAVE_LIBPNG -DHAVE_LIBPDF 
+
+
+# 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. -zm -bm -5r -sg -orilt -j -za99 -aa -d2 $(CPPFLAGS)
+
+
+# paths for external libs added here... 
+LDLIBS = 
+# ...and here.
+# see other terminal defines in term.h
+TERMFLAGS = -DGNUPLOT_PS_DIR="$(GNUPLOT_PS_DIR)" -I..\term 
+
+# macros for makefile.all
+O=obj
+T=..\term\
+D=..\docs\
+M=..\demo\
+
+BINARYFILES=$(M)binary1 $(M)binary2 $(M)binary3
+
+# Note: like makefile.wc, this need the special Watcom-style version of
+# makefile.all, because line continuation in WMake is different...
+!INCLUDE makefile.awc
+
+default: wgnuplot.exe $(HELPFILE) wgnuplot.mnu &
+         $(BINARYFILES) pgnuplot.exe .SYMBOLIC
+
+OBJS = $(COREOBJS) version.obj
+
+WINOBJS = winmain.obj wgnuplib.obj wgraph.obj wprinter.obj wtext.obj &
+        wpause.obj wmenu.obj gpexecute.obj
+
+
+# default rule
+.c.obj: .AUTODEPEND
+        $(WCC) $(WCFLAGS) $*.c
+
+$(OBJS): config.h .AUTODEPEND
+
+# file-specific rules
+config.h: ..\config\config.oww
+        copy ..\config\config.oww config.h
+
+wgnuplot.exe: $(OBJS) $(WINOBJS) wgnuplot.res texticon.ico grpicon.ico
+        $(WLD) @<<linkopt1.oww $(LDLIBS)
+RUNTIME windows=4.0
+SYSTEM nt_win
+DEBUG ALL
+OPTION quiet
+FILE {
+ $(OBJS)
+ $(WINOBJS)
+}
+LIBRARY kernel32.lib,user32.lib,gdi32.lib,winspool.lib,comdlg32.lib
+LIBRARY advapi32.lib,shell32.lib
+OPTION map
+OPTION SYMFILE
+NAME wgnuplot.exe
+OPTION stack=1M
+OPTION resource=wgnuplot.res
+OPTION ELIMINATE
+REFERENCE _wstart_ 
+OPTION START=_wstart_
+<<
+
+# NOTE: Unknown what /l 0x409 does in MS RC call --- seems to work without, though
+wgnuplot.res :  win\wgnuplot.rc win\wgnuplib.rc &
+  win\wresourc.h texticon.ico grpicon.ico
+        $(WRC) -r -q -bt=nt -fowgnuplot.res -i=win &
+          -d_WIN32 -dNDEBUG -dWIN32 -dMSRC win\wgnuplot.rc
+
+term.obj: term.c term.h plot.h setshow.h bitmap.h $(CORETERM)
+        $(WCC) $(WCFLAGS) $(TERMFLAGS) term.c
+
+winmain.obj: win\winmain.c win\wgnuplib.h win\wtext.h plot.h
+        $(WCC) $(WCFLAGS) win\winmain.c
+
+wgnuplib.obj: win\wgnuplib.c .AUTODEPEND
+        $(WCC) $(WCFLAGS) win\wgnuplib.c
+
+wmenu.obj: win\wmenu.c .AUTODEPEND
+        $(WCC) $(WCFLAGS) win\wmenu.c
+
+wtext.obj: win\wtext.c .AUTODEPEND
+        $(WCC) $(WCFLAGS) win\wtext.c
+
+wpause.obj: win\wpause.c .AUTODEPEND
+        $(WCC) $(WCFLAGS) win\wpause.c
+
+wprinter.obj: win\wprinter.c .AUTODEPEND
+        $(WCC) $(WCFLAGS) win\wprinter.c
+
+wgraph.obj: win\wgraph.c .AUTODEPEND .AUTODEPEND
+        $(WCC) $(WCFLAGS) win\wgraph.c
+
+wgnuplot.mnu: win\wgnuplot.mnu
+        copy win\wgnuplot.mnu wgnuplot.mnu
+
+pgnuplot.exe: win\pgnuplot.c version.obj .AUTODEPEND
+        $(WCL) -5r -zq -d2 -fm win\pgnuplot.c -fe=pgnuplot.exe -I. &
+         version.obj user32.lib
+
+
+# extract icons from wgnuplot.rc
+texticon.ico: geticon.exe win\wgnuplot.rc
+        geticon win\wgnuplot.rc
+
+grpicon.ico: geticon.exe win\wgnuplot.rc
+        geticon win\wgnuplot.rc
+
+geticon.exe: win\geticon.c
+        $(WCL) -zq -bt=nt -fe=geticon.exe win\geticon.c
+
+# convert gnuplot.doc to gnuplot.rtf
+$(HELPFILE): doc2rtf.exe $(D)gnuplot.doc win\wgnuplot.hpj
+        doc2rtf $(D)gnuplot.doc win\gnuplot.rtf
+        $(HCW) /c /e win\wgnuplot.hpj
+        if exist win\wgnuplot.hlp copy win\wgnuplot.hlp .
+
+doc2rtf.exe: $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c config.h
+        $(WCL) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI /I..\docs;..\term -fedoc2rtf.exe $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c
+
+#make binary demo files
+bf_test.exe : bf_test.c dbinary.obj alloc.obj
+        $(WCL) $(WCFLAGS) -w1 -DWINDOWS_NO_GUI -febf_test.exe bf_test.c dbinary.obj alloc.obj
+
+$(BINARYFILES): bf_test.exe
+        .\bf_test
+        move binary? $(M).
+        
+# _Windows causes wtext.h to define fread() etc
+dbinary.obj: binary.c
+        $(WCC) $(WCFLAGS) /U_Windows -w1 -fodbinary.obj binary.c
+
+# clean up temporary files
+clean: .SYMBOLIC
+        rm -f *.obj *.err *.ico
+        rm -f wgnuplot.res win\gnuplot.rtf win\wgnuplot.hlp
+        rm -f bf_test.exe linkopt1.oww doc2rtf.exe geticon.exe
+        rm -f wgnuplot.map wgnuplot.sym pgnuplot.map wgnuplot.gid
+        
+
+realclean: clean .SYMBOLIC
+        rm -f wgnuplot.exe wgnuplot.hlp wgnuplot.mnu pgnuplot.exe
+        rm -f ..\demo\binary[123] ..\demo\fit.log ..\demo\soundfit.par
+        rm -f config.h