Initial release of Maemo 5 port of gnuplot
[gnuplot] / config / makefile.nt
diff --git a/config/makefile.nt b/config/makefile.nt
new file mode 100644 (file)
index 0000000..ca3581d
--- /dev/null
@@ -0,0 +1,225 @@
+#
+# $Id: makefile.nt,v 1.20.2.1 2008/02/23 11:22:28 mikulik Exp $
+#
+# GNUPLOT Makefile Microsoft Visual C++ and nmake on WinNT and Win95/98/..
+
+# John Bollinger bbands@yahoo.com, 4 March 2002:
+#   Added png support with zlib and libpng as subs of .\src
+#     libpng and zlib can be downloaded from ftp://ftp.uu.net/graphics/png
+#   Added pdf support with pdflib as a sub of .\src
+#     pdflib can be downloaded from http://www.pdflib.com
+#   Added MSC multi-thread support for compatibility with pdflib
+# Bastian Maerkisch bmaerkisch@web.de:
+#   Added support for binary version of the GD library (bgd.dll) 
+#     gdlib can be downloaded from http://www.boutell.com/gd
+#   Removed zlib and libpng again as they're already included in bgd.dll
+
+#
+# To compile with Visual C: 
+#      Download gdlib to ..\src\gdwin32
+#      Download pdflib to ..\src\pdflib and compile it if you choose the source
+#
+#      Find and run VCVARS32.BAT (or maybe VSVARS32.BAT)
+#      change to the gnuplot\src directory
+#      Now run: 
+#        nmake -f ..\config\makefile.nt
+#       You can also do it like this: 
+#        copy ..\config\makefile.nt makefile.nt
+#         edit the copy to your liking
+#         nmake -f makefile.nt
+
+# where to place gnuplot.gih helpfile
+HELPFILE = wgnuplot.hlp
+
+# directory for PostScript prolog and associated files
+GNUPLOT_PS_DIR = share\\PostScript
+
+TOP = .
+
+# /c  means don't link
+# /I  means extra include directory
+# /Fm means produce link map
+# /Od means suppress optimizations (esp. for debug)
+# /O2 mans optimize for speed
+# /Zi mean prepare for codeview
+# /G6 means optimize code for pentium pro
+# /G5 means optimize code for pentium
+# /G4 means optimize code for 486
+# /G3 means optimize code for 386
+# /MT means include multi-thread support
+# /MD means include multi-thread support (DLL)
+
+CC = cl /c
+LD = link
+
+# compiler flags
+OPTIONS = /DUSE_MOUSE
+OPTIONS = $(OPTIONS) /DHAVE_LIBGD /DHAVE_GD_GIF /DGIF_ANIMATION /DHAVE_GD_PNG /DHAVE_GD_JPEG /DHAVE_GD_TTF
+OPTIONS = $(OPTIONS) /DHAVE_LIBPDF
+OPTIONS = $(OPTIONS) /DGNUPLOT_HISTORY
+CBASEFLAGS = /G5 /GX /GR /MD /O2 /nologo
+CFLAGS = $(CBASEFLAGS) /I$(TOP) /D_Windows /DWIN32 /DHAVE_CONFIG_H /D__MSC__ /DHELPFILE=\"$(HELPFILE)\" $(OPTIONS)
+
+!IF "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
+MACHINE = $(PROCESSOR_ARCHITECTURE)
+!ELSE
+MACHINE = IX86
+!ENDIF
+
+# paths for external libs added here... 
+LDFLAGS = /subsystem:windows /nologo /MACHINE:$(MACHINE) /MAP:GNUPLOT /libpath:..\src\pdflib\pdflib /libpath:..\src\gdwin32 
+
+# ...and here.
+# see other terminal defines in term.h
+TERMFLAGS = /I..\\term /I..\\src\\pdflib\\pdflib /I..\\src\\gdwin32 /DGNUPLOT_PS_DIR=\"$(GNUPLOT_PS_DIR)\"
+
+# macros for makefile.all
+O=obj
+T=..\\term\\
+D=..\\docs\\
+M=..\\demo\\
+
+default: wgnuplot.exe $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe pgnuplot.exe
+
+!INCLUDE makefile.all
+
+OBJS = $(COREOBJS) version.obj
+
+WINOBJS = winmain.obj wgnuplib.obj wgraph.obj wprinter.obj wtext.obj \
+       wpause.obj wmenu.obj gpexecute.obj
+
+WINDOWS = makefile.win makefile.nt README.win win\wcommon.h \
+       win\wgnuplib.c win\wgnuplib.def win\wgnuplib.h win\wgnuplib.rc \
+       win\wgnuplot.def win\wgnuplot.hpj win\wgnuplot.mnu win\wgraph.c \
+       win\winmain.c win\wmenu.c win\wpause.c win\wprinter.c \
+       win\wresourc.h win\wtext.c win\wtext.h win\geticon.c \
+       $(D)doc2rtf.c $(T)win.trm win\grpicon.ico win\texticon.ico
+
+# default rules
+.c.obj:
+       $(CC) $(CFLAGS) $*.c
+
+$(OBJS): config.h
+
+linkopt1.msw: makefile.nt
+       copy gnuplot.opt linkopt1.msw
+       echo winmain >> linkopt1.msw
+       echo gpexecute >> linkopt1.msw
+       echo readline >> linkopt1.msw
+       echo wgnuplib >> linkopt1.msw
+       echo wtext >> linkopt1.msw
+       echo wmenu >> linkopt1.msw
+       echo wpause >> linkopt1.msw
+       echo wgraph >> linkopt1.msw
+       echo wprinter >> linkopt1.msw
+       echo kernel32.lib >> linkopt1.msw
+       echo user32.lib >> linkopt1.msw
+       echo gdi32.lib >> linkopt1.msw
+       echo winspool.lib >> linkopt1.msw
+       echo comdlg32.lib >> linkopt1.msw
+       echo advapi32.lib >> linkopt1.msw
+       echo shell32.lib >> linkopt1.msw
+       echo pdflib.lib >> linkopt1.msw
+       echo bgd.lib >> linkopt1.msw
+       echo wgnuplot.res >> linkopt1.msw
+
+makefile.nt: ..\config\makefile.nt
+       copy ..\config\makefile.nt makefile.nt
+
+config.h: ..\config\config.nt
+       copy ..\config\config.nt config.h
+
+wgnuplot.exe: $(OBJS) $(WINOBJS) win\wgnuplot.def wgnuplot.res linkopt1.msw texticon.ico grpicon.ico
+       $(LD) $(LDFLAGS) /out:wgnuplot.exe @linkopt1.msw
+
+# rules
+
+wgnuplot.res :  win\wgnuplot.rc win\wgnuplib.rc win\wresourc.h texticon.ico grpicon.ico
+       rc /l 0x409 /fowgnuplot.res /i "win" /d "NDEBUG" /d WIN32 /d MSRC win\wgnuplot.rc
+
+term.obj: term.c term.h plot.h setshow.h bitmap.h $(CORETERM)
+       $(CC) $(CFLAGS) $(TERMFLAGS) term.c
+
+winmain.obj: win\winmain.c win\wgnuplib.h win\wtext.h plot.h
+       $(CC) $(CFLAGS) win\winmain.c
+
+WINDEPS = win\wgnuplib.h win\wcommon.h win\wresourc.h
+
+wgnuplib.obj: win\wgnuplib.c $(WINDEPS)
+       $(CC) $(CFLAGS) win\wgnuplib.c
+
+wmenu.obj: win\wmenu.c $(WINDEPS)
+       $(CC) $(CFLAGS) win\wmenu.c
+
+wtext.obj: win\wtext.c $(WINDEPS)
+       $(CC) $(CFLAGS) win\wtext.c
+
+wpause.obj: win\wpause.c $(WINDEPS)
+       $(CC) $(CFLAGS) win\wpause.c
+
+wprinter.obj: win\wprinter.c $(WINDEPS)
+       $(CC) $(CFLAGS) win\wprinter.c
+
+wgraph.obj: win\wgraph.c $(WINDEPS)
+       $(CC) $(CFLAGS) win\wgraph.c
+
+wgnuplot.mnu: win\wgnuplot.mnu
+       copy win\wgnuplot.mnu wgnuplot.mnu
+
+pgnuplot.exe: win\pgnuplot.c
+       cl $(CBASEFLAGS) /I$(TOP) win\pgnuplot.c /link version.obj user32.lib
+
+# extract icons from wgnuplot.rc
+texticon.ico: grpicon.ico
+
+grpicon.ico: geticon.exe win\wgnuplot.rc
+       geticon win\wgnuplot.rc
+
+geticon.exe: win\geticon.c
+       cl /DMSDOS /F 5000 /W1 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
+       cl $(CFLAGS) /F 5000 /W1 /I. /DWINDOWS_NO_GUI /I$(D) /I$(T) -Fedoc2rtf.exe $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c
+
+#make binary demo files
+$(M)bf_test.exe : bf_test.c dbinary.obj alloc.obj
+       cl $(CFLAGS) /F 5000 /W1 /DWINDOWS_NO_GUI /Fe$(M)bf_test.exe bf_test.c dbinary.obj alloc.obj
+       cd ..\demo
+       bf_test
+       cd ..\src
+
+# _Windows causes wtext.h to define fread() etc
+dbinary.obj: binary.c
+               $(CC) $(CFLAGS) /U_Windows /F 5000 /W1 /Fodbinary.obj binary.c
+
+# clean up temporary files
+clean:
+       if exist *.obj del *.obj
+       if exist *.ico del *.ico
+       if exist wgnuplot.res del wgnuplot.res
+       if exist win\gnuplot.rtf del win\gnuplot.rtf
+       if exist win\wgnuplot.hlp del win\wgnuplot.hlp
+       if exist ..\demo\bf_test.exe del ..\demo\bf_test.exe
+       if exist linkopt1.msw del linkopt1.msw
+       if exist doc2rtf.exe del doc2rtf.exe
+       if exist geticon.exe del geticon.exe
+       if exist GNUPLOT del GNUPLOT
+
+veryclean: clean
+       if exist wgnuplot.exe del wgnuplot.exe
+       if exist wgnuplot.hlp del wgnuplot.hlp
+       if exist wgnuplot.mnu del wgnuplot.mnu
+       if exist pgnuplot.exe del pgnuplot.exe
+       if exist ..\demo\binary1 del ..\demo\binary1
+       if exist ..\demo\binary2 del ..\demo\binary2
+       if exist ..\demo\binary3 del ..\demo\binary3
+       if exist ..\demo\fit.log del ..\demo\fit.log
+       if exist ..\demo\soundfit.par del ..\demo\soundfit.par
+       if exist config.h del config.h
+       if exist makefile.nt del makefile.nt