X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=config%2Fmakefile.win;fp=config%2Fmakefile.win;h=b817bf605d1be3ce811fd6e544a1681ba70f445e;hb=39ec1247a71f61152a4a7f502a30f06a3896c5da;hp=0000000000000000000000000000000000000000;hpb=06be459be4f5f6a7c6ff878e84f355fb2575caa8;p=gnuplot diff --git a/config/makefile.win b/config/makefile.win new file mode 100644 index 0000000..b817bf6 --- /dev/null +++ b/config/makefile.win @@ -0,0 +1,379 @@ +# +# $Id: makefile.win,v 1.14 2005/08/07 09:43:27 mikulik Exp $ +# +# GNUPLOT Makefile for Borland C++ 3.1 Windows version +# and Win32 using Borland C++ 4 (or 5? --- 4.52 is known to work) +# or Borland C++ Builder 1 (newer versions may work as well) +# +# Cd to the 'src' directory, and 'make -f ../config/makefile.win' +# To compile for win32, pass option '-DWIN32=1' to 'make'. +# +# This makefile may need some editing before it can be used. Check +# BCC installation path, the WIN32 and RUNTIME_LIB flags, in particular. +# +# The compile and link includes debug flags. Take them out if you +# do not want them included (-y -v -M, /m /s /v /l) +# +# New 991003: WIN32=1 build makes the helpers (doc2rtf, bf_test) as Win32 +# console applications, instead of plain DOS programs. This +# way, it also works with those compilers missing a DOS option. +# +# CAVEAT for the 16bit Windows (BC 3.1) version: +# You will also need to edit term.h to not include some of the +# terminal types which you are not going to use, otherwise you will get a +# message about too much global data defined in term.c. A working example +# is 'config/term_pc.h'. + +# directory names, like for use with makefile.all: +T=..\\term\\ +D=..\\docs\\ +M=..\\demo\\ + + +# where to place wgnuplot.hlp helpfile +HELPFILE = wgnuplot.hlp + +# location of Borland C compiler +TC = e:\borl\cbuilder + +# location of TLINK.EXE and BCC.EXE +BIN = $(TC)\bin\\ + +#The full path name of the help compiler. For BC++: +#HC = $(BIN)\hc +# this comes with C++ Builder 1.0 (but doesn't seem to work): +#HC = $(TC)\help\tools\hcw /c /e +# or you can use the 'help workshop' available directly from MS: +HC = h:\mssdk\bin\hcw /c/e + +# WIN32=1 for Win32s or Win32 (--> '95 or NT) +# new: allow '-DWIN32=1' on make command line to take effect: +!if "$(WIN32)"=="" +WIN32=0 +!endif + +# Uncomment _this_ for BC++ 4.52 (or others that give linker errors for +# the 'errno' variable)... : +#RUNTIME_LIBRARY=cw32.lib + +# ... or this for more modern ones (like C++Builder 1.0) -- it's the +# properly multithreading one: +RUNTIME_LIBRARY=cw32mt.lib + +!if $(WIN32) + +# 32bit Windows compilation. +CC = bcc32 +PROCESSOR_OPT = +DEFINE_HELPFILE = -DHELPFILE=\"$(HELPFILE)\" + +# For BC++ 4.52, you may try this version with Pentium scheduling +# optimization. NB: bcc32a in 4.52 increased in bugginess quite +# a bit more than in program speed :-( +#CC = bcc32a +#PROCESSOR_OPT = -5 + +!else + +# 16bit Windows compiler +CC = bcc +DEFINE_HELPFILE = -DHELPFILE="$(HELPFILE)" + +!endif + +# -c means don't link +# -ml means use large model (large code, large data) +# -M means produce link map +# -y means include line numbers for debugger +# -v means include debug info +# -w- means ignore warnings and do not report them +# -w-rvl ignore function must return a value error +# -Ff=128 means make data object > 128 FAR +# -W means window application +# -DREADLINE to use the history/line editing capability. If you want this +# capability add -DREADLINE to CFLAGS then add 'readline' to the /o +# section of the linker call. +!if $(WIN32) +CFLAGS = -c -W -M -G -y -v -w-rvl -w-use -w-par -w-aus -w-pro $(PROCESSOR_OPT) -I$(TC)\include -Iwin -DREADLINE=1 -DHAVE_STRNICMP -DWIN32 -DHAVE_STRERROR -DNO_GIH -DWIN32_LEAN_AND_MEAN -DPROTOTYPES -DHAVE_VFPRINTF -DHAVE_GETCWD -DHAVE_STPCPY -DUSE_MOUSE=1 -DWIN_IPC -DHAVE_STRINGIZE -DGP_MATHERR=_matherr -DGP_EXCEPTION=_exception -DHAVE_STRUCT_EXCEPTION_IN_MATH_H=1 +CAUXFLAGS = -tWC -w-par -w-use -w-aus -f -N -M -y -v -d -I$(TC)\include -DWIN32 -DWINDOWS_NO_GUI -DHAVE_STRNICMP -DPROTOTYPES -DHAVE_STRINGIZE +!else +CFLAGS = -c -W -ml -w-par -w-use -w-aus -f -h -N -M -y -v -d -Ff=32 -I$(TC)\include -Iwin -DREADLINE=1 -zEGPFAR_DATA -DHAVE_STRNICMP -DMSDOS=1 -DNO_GIH -DPROTOTYPES -DHAVE_GETCWD -DHAVE_VFPRINTF -DNDEBUG -DHAVE_STRINGIZE +CAUXFLAGS = -ml -w-par -w-use -w-aus -f -N -M -y -v -d -I$(TC)\include -DMSDOS=1 -DHAVE_STRNICMP -DPROTOTYPES -DHAVE_VFPRINTF -DHAVE_STRINGIZE +!endif + +OBJS = alloc.obj axis.obj binary.obj bitmap.obj color.obj command.obj contour.obj datafile.obj \ + dynarray.obj eval.obj fit.obj gadgets.obj getcolor.obj graphics.obj graph3d.obj help.obj \ + hidden3d.obj history.obj internal.obj interpol.obj matrix.obj misc.obj mouse.obj parse.obj \ + plot.obj plot2d.obj plot3d.obj pm3d.obj readline.obj save.obj scanner.obj \ + set.obj show.obj specfun.obj standard.obj stdfn.obj tables.obj \ + term.obj time.obj unset.obj util.obj util3d.obj variable.obj \ + history.obj version.obj winmain.obj + +DLLOBJS = gpexecute.obj wgnuplib.obj wtext.obj wmenu.obj wpause.obj wgraph.obj wprinter.obj + +CSOURCE5 = $(T)aed.trm $(T)cgi.trm $(T)cgm.trm $(T)debug.trm \ + $(T)dumb.trm $(T)dxy.trm \ + $(T)eepic.trm $(T)epson.trm $(T)fig.trm $(T)hp26.trm \ + $(T)hp2648.trm $(T)hpgl.trm $(T)hpljii.trm +CSOURCE6 = $(T)impcodes.h $(T)imagen.trm $(T)object.h \ + $(T)iris4d.trm $(T)kyo.trm $(T)latex.trm $(T)pbm.trm $(T)win.trm +CSOURCE7 = $(T)post.trm $(T)qms.trm $(T)regis.trm $(T)sun.trm \ + $(T)t410x.trm $(T)tek.trm $(T)unixpc.trm $(T)unixplot.trm \ + $(T)v384.trm $(T)x11.trm +CSOURCE8 = contour.c specfun.c binary.c interpol.obj +WINDOWS = makefile.win makefile.msw 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\wgnuplot.rc \ + 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\wgnupl32.def + +!if $(WIN32) +all: wgnupl32.exe $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe +!else +all: wgnuplot.exe wgnuplot.dll $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe +!endif + +wgnuplot.exe: $(OBJS) win\wgnuplot.def win\wgnuplot.rc winmain.obj wgnuplot.lib +# $(BIN)tlink /Twe /c @&&! + $(BIN)tlink /Twe /c /s /v /l @&&! +$(TC)\lib\C0Wl + +bitmap command eval graphics graph3d help internal misc parse + +plot plot2d plot3d scanner set show specfun standard stdfn term util version contour + +binary interpol variable + +axis gadgets color getcolor pm3d mouse + +winmain + +readline history + +fit matrix datafile alloc util3d hidden3d dynarray time + +,wgnuplot,wgnuplot, + +wgnuplot.lib + +$(TC)\lib\import + +$(TC)\lib\mathwl + +$(TC)\lib\cwl, + +win\wgnuplot.def +! + $(BIN)brc -30 -k -i$(TC)\include win\wgnuplot.rc wgnuplot.exe + +# gnuplot.opt contains a list of the 'core' files, in case that's of +# any use... + +wgnupl32.exe: $(OBJS) $(DLLOBJS) win\wgnupl32.def wgnupl32.res winmain.obj +# $(BIN)tlink32 /Tpe /c @&&! + $(BIN)tlink32 /Tpe /c /m /s /v @&&! +$(TC)\lib\C0W32 + +bitmap command eval graphics graph3d help internal misc parse + +plot plot2d plot3d scanner set show specfun standard stdfn term util version contour + +wgnuplib wtext wmenu wpause wgraph wprinter gpexecute + +binary interpol + +axis gadgets color getcolor pm3d mouse + +winmain + +readline history + +fit matrix datafile alloc util3d hidden3d dynarray time + +save unset variable tables + +,wgnupl32,wgnupl32, + +$(TC)\lib\import32 + +$(TC)\lib\$(RUNTIME_LIBRARY), + +win\wgnupl32.def, wgnupl32.res +! + +wgnupl32.res: win\wgnuplot.rc win\wgnuplib.rc + $(BIN)brcc32 -DWIN32 -i$(TC)\include -r -fowgnupl32 win\wgnuplot.rc + +# default rules + +.c.obj: + $(BIN)$(CC) @&&! +$(CFLAGS) +! $< + +# rules + +bitmap.obj: bitmap.c bitmap.h plot.h + +command.obj: command.c plot.h setshow.h fit.h + $(BIN)$(CC) $(DEFINE_HELPFILE) @&&! +$(CFLAGS) +! command.c + +contour.obj: contour.c plot.h + +eval.obj: eval.c plot.h + +graphics.obj: graphics.c plot.h setshow.h + +graph3d.obj: graphics.c plot.h setshow.h + +fit.obj: fit.c fit.h matrix.h plot.h + +matrix.obj: matrix.c matrix.h fit.h + +internal.obj: internal.c plot.h + +misc.obj: misc.c plot.h setshow.h + +parse.obj: parse.c plot.h + $(BIN)$(CC) @&&! +$(CFLAGS) +! parse.c + +plot.obj: plot.c plot.h setshow.h + $(BIN)$(CC) @&&! +$(CFLAGS) +! plot.c + +hidden3d.obj: hidden3d.c plot.h setshow.h + +plot3d.obj: plot3d.c plot.h setshow.h + +plot2d.obj: plot2d.c plot.h setshow.h + +readline.obj: readline.c plot.h + +scanner.obj: scanner.c plot.h + +set.obj: set.c plot.h setshow.h + +show.obj: show.c plot.h setshow.h + $(BIN)$(CC) $(DEFINE_HELPFILE) @&&! +$(CFLAGS) +! show.c + +specfun.obj: specfun.c + +standard.obj: standard.c plot.h + +stdfn.obj: stdfn.c stdfn.h + +interpol.obj: interpol.c plot.h setshow.h + +term.obj: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) win\wgnuplib.h + $(BIN)$(CC) @&&! +$(CFLAGS) +! $(TERMFLAGS) -I$(T) -I. term.c + +util.obj: util.c plot.h + +util3d.obj: util3d.c plot.h setshow.h + +variable.obj: variable.c plot.h variable.h + +version.obj: version.c + +winmain.obj: win\winmain.c win\wgnuplib.h win\wtext.h plot.h + $(BIN)$(CC) $(DEFINE_HELPFILE) @&&! +$(CFLAGS) +! win\winmain.c + +wgnuplot.mnu: win\wgnuplot.mnu + copy win\wgnuplot.mnu wgnuplot.mnu + + +# different compiler options for DLL's */ +!if $(WIN32) +DLLCC = $(BIN)$(CC) -DWIN32 -c -M -y -v -WE -I$(TC)\include -Iwin -DPROTOTYPES -DUSE_MOUSE=1 -DWIN_IPC -DHAVE_STRINGIZE +!else +DLLCC = $(BIN)$(CC) -c -WD -ms! -w-par -f -M -y -v -w -N -I$(TC)\include -Iwin +!endif + +wgnuplot.lib: wgnuplot.dll + $(BIN)implib wgnuplot.lib wgnuplot.dll + +wgnuplot.dll: $(DLLOBJS) win/wgnuplib.def win/wgnuplib.rc + $(BIN)tlink /c /n /Twd /L$(TC)\lib /m /s /v /l @&&! +c0ds + +wgnuplib wtext wmenu wpause wgraph wprinter, + +wgnuplot.dll, + +wgnuplib.map, + +import mathws cws, + +win\wgnuplib.def +! + $(BIN)brc -30 -i$(TC)\include -t win\wgnuplib.rc wgnuplot.dll + +wgnuplib.obj: win/wgnuplib.c win/wgnuplib.h win/wcommon.h win/wresourc.h + $(DLLCC) win/wgnuplib.c + +wmenu.obj: win/wmenu.c win/wgnuplib.h win/wcommon.h win/wresourc.h + $(DLLCC) win/wmenu.c + +wtext.obj: win/wtext.c win/wgnuplib.h win/wcommon.h win/wresourc.h + $(DLLCC) win/wtext.c + +wpause.obj: win/wpause.c win/wgnuplib.h win/wcommon.h win/wresourc.h + $(DLLCC) win/wpause.c + +wprinter.obj: win/wprinter.c win/wgnuplib.h win/wcommon.h win/wresourc.h + $(DLLCC) win/wprinter.c + +wgraph.obj: win/wgraph.c win/wgnuplib.h win/wcommon.h win/wresourc.h + $(DLLCC) win/wgraph.c + +# convert gnuplot.doc to gnuplot.rtf +$(HELPFILE): win\gnuplot.rtf + $(HC) win\wgnuplot.hpj + -copy win\wgnuplot.hlp $(HELPFILE) + +win\gnuplot.rtf: doc2rtf.exe $(D)gnuplot.doc win\wgnuplot.hpj + doc2rtf $(D)gnuplot.doc win\gnuplot.rtf + +doc2rtf.exe: $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7) + $(BIN)$(CC) -edoc2rtf.exe @&&! +-D_Windows +-w-pro +$(CAUXFLAGS) +-I. -I$(T) -I$(D) +! $(D)doc2rtf.c $(D)termdoc.c $(D)xref.c + +# make binary demo files +$(M)bf_test.exe: bf_test.c dbinary.obj dalloc.obj + $(BIN)$(CC) -e$(M)bf_test.exe @&&! +-L$(TC)\lib +$(CAUXFLAGS) +! bf_test.c dbinary.obj dalloc.obj + cd ..\demo + bf_test + cd ..\src + +dalloc.obj: alloc.c + $(BIN)$(CC) -c @&&! +$(CAUXFLAGS) +! -odalloc.obj alloc.c + +dbinary.obj: binary.c + $(BIN)$(CC) -c @&&! +$(CAUXFLAGS) +! -odbinary.obj binary.c + +# clean up temporary files +clean: + del *.obj + del win\*.obj + del wgnuplot.map + del win\wgnuplot.res + del wgnupl32.map + del wgnupl32.res + del win\gnuplot.rtf + del doc2rtf.map + del doc2rtf.exe + del win\wgnuplib.res + del wgnuplib.map + del wgnuplot.lib + del bf_test.map + del $(M)bf_test.exe + del $(M)bf_test.map + +realclean: veryclean + +veryclean: clean + del wgnuplot.exe + del wgnuplot.hlp + del win\wgnuplot.hlp + -attrib -h wgnuplot.gid + del wgnuplot.gid + del wgnuplot.mnu + del wgnuplot.dll + del wgnupl32.exe + del $(M)binary1 + del $(M)binary2 + del $(M)binary3 + del $(M)fit.log + del $(M)soundfit.par