Annotation of OpenXM_contrib/gnuplot/makefile.cyg, Revision 1.1
1.1 ! maekawa 1: # To compile gnuplot for WinNT and Win95
! 2: #
! 3: #
! 4: # Changed for use with MinGW32 by HBB
! 5: # Modified for Cygwin beta 20.1 which includes MINGW32
! 6: # Resource compiler is windres.exe in Cygwin b20.1
! 7: # Note png and gif libraries if used have to be build for Cygwin b20.1 with -mno-cygwin option
! 8: #
! 9:
! 10: # where to place gnuplot.gih helpfile
! 11: HELPFILE = wgnuplot.hlp
! 12: TOP = .
! 13: # May need to add include/mingw32 for Cygwin b20, but not for b20.1
! 14: #WIN32INC= /e/Cygnus/cygwin-b20/H-i586-cygwin32/i586-cygwin32/include/mingw32
! 15: WIN32INC=/usr/local/include
! 16: #WIN32LIBS =
! 17: #WIN32FLAGS= -DWINVER=0x0400
! 18: CPU=i586
! 19:
! 20: CC = gcc
! 21: LD = gcc
! 22: WINCFLAGS = -O2 -mno-cygwin $(WIN32FLAGS) -I$(WIN32INC) -I$(TOP) -D_Windows -D__WIN32__ -DWIN32 -DHAVE_STRNICMP -DREADLINE=1 -DNO_GIH -DGP_INLINE=inline -DHAVE_SLEEP -DANSI_C -DHAVE_GETCWD -DNEAR= -DHAVE_LIBPNG -DHAVE_LIBGD -DNO_SETVBUF -DCYGWIN
! 23: WINLDFLAGS = -s -mwindows -mno-cygwin -L/usr/local/lib # -v # -Wl,--verbose
! 24: CFLAGS = -g -O2 -I$(TOP) -DNO_GIH -DHAVE_STRNICMP -DREADLINE -DHAVE_SLEEP -DHAVE_GETCWD -DNEAR= -DWIN32
! 25: LDFLAGS = -g #-v # -Wl,--verbose
! 26:
! 27: RM = rm -f
! 28: CP = cp -p
! 29:
! 30: #You'll need the MS Platform SDK, for now. Enter its path here
! 31: MSSDK = e:/sdk
! 32:
! 33: HCW = $(MSSDK)/bin/hcw
! 34: #RC = $(MSSDK)/bin/rc
! 35:
! 36: RC = windres.exe
! 37: RCFLAGS=--define __WIN32__ --define __WIN95__ --define __GNUWIN32__ --define MSRC --define WIN32
! 38:
! 39: # see other terminal defines in term.h
! 40: TERMFLAGS = -I$(TOP)/term
! 41:
! 42:
! 43: # macros for makefile.all
! 44: O=o
! 45: T=term/
! 46: D=docs/
! 47: L=docs/latex/
! 48: M=demo/
! 49:
! 50:
! 51: default: wgnuplot.exe $(HELPFILE) wgnuplot.mnu $(M)bf_test.exe
! 52:
! 53: # include the 'core makefile template'
! 54: include makefile.all
! 55:
! 56: OBJS = $(COREOBJS) version.$(O)
! 57:
! 58: WINOBJS = winmain.$(O) wgnuplib.$(O) wgraph.$(O) wprinter.$(O) wtext.$(O) wpause.$(O) wmenu.$(O)
! 59:
! 60: WINDOWS = makefile.win makefile.nt README.win win/wcommon.h \
! 61: win/wgnuplib.c win/wgnuplib.def win/wgnuplib.h win/wgnuplib.rc \
! 62: win/wgnuplot.def win/wgnuplot.hpj win/wgnuplot.mnu win/wgraph.c \
! 63: win/winmain.c win/wmenu.c win/wpause.c win/wprinter.c \
! 64: win/wresourc.h win/wtext.c win/wtext.h win/geticon.c \
! 65: docs/doc2rtf.c term/win.trm win/grpicon.ico win/texticon.ico
! 66:
! 67:
! 68: # default rules
! 69: .SUFFIXES: .exe .o .c
! 70: .c.o:
! 71: $(CC) -c $(WINCFLAGS) $*.c
! 72:
! 73: WINLDLIBS = -lkernel32 -lgdi32 -lpng -lz -lgd
! 74:
! 75: wgnuplot.exe: $(OBJS) $(WINOBJS) win/wgnuplot.def wgnuplot_res.o texticon.ico grpicon.ico
! 76: $(LD) $(WINLDFLAGS) -o $@ $(OBJS) $(WINOBJS) wgnuplot_res.o $(WINLDLIBS)
! 77:
! 78: # rules
! 79:
! 80: wgnuplot_res.o : win/wgnuplot.rc win/wgnuplib.rc win/wresourc.h texticon.ico grpicon.ico
! 81: $(RC) -i win/wgnuplot.rc -o wgnuplot_res.o $(RCFLAGS)
! 82:
! 83: show.o: show.c plot.h setshow.h
! 84: $(CC) -c $(WINCFLAGS) -DHELPFILE=\"$(HELPFILE)\" -DGNUPLOT_BINDIR=\"$(bindir)\" -c $<
! 85:
! 86: term.$(O): term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
! 87: $(CC) -c $(WINCFLAGS) $(TERMFLAGS) term.c
! 88:
! 89: version.$(O): version.c
! 90:
! 91: WINDEPS = win/wgnuplib.h win/wcommon.h win/wresourc.h
! 92:
! 93: winmain.$(O): win/winmain.c win/wgnuplib.h win/wtext.h plot.h
! 94: $(CC) -c $(WINCFLAGS) -DHELPFILE=\"$(HELPFILE)\" win/winmain.c
! 95:
! 96: wgnuplib.$(O): win/wgnuplib.c $(WINDEPS)
! 97: $(CC) -c $(WINCFLAGS) win/wgnuplib.c
! 98:
! 99: wmenu.$(O): win/wmenu.c $(WINDEPS)
! 100: $(CC) -c $(WINCFLAGS) win/wmenu.c
! 101:
! 102: wtext.$(O): win/wtext.c $(WINDEPS)
! 103: $(CC) -c $(WINCFLAGS) win/wtext.c
! 104:
! 105: wpause.$(O): win/wpause.c $(WINDEPS)
! 106: $(CC) -c $(WINCFLAGS) win/wpause.c
! 107:
! 108: wprinter.$(O): win/wprinter.c $(WINDEPS)
! 109: $(CC) -c $(WINCFLAGS) win/wprinter.c
! 110:
! 111: wgraph.$(O): win/wgraph.c $(WINDEPS)
! 112: $(CC) -c $(WINCFLAGS) win/wgraph.c
! 113:
! 114: wgnuplot.mnu: win/wgnuplot.mnu
! 115: $(CP) $^ $@
! 116:
! 117: # extract icons from wgnuplot.rc
! 118: texticon.ico: grpicon.ico
! 119:
! 120: grpicon.ico: geticon.exe win/wgnuplot.rc
! 121: geticon win/wgnuplot.rc
! 122:
! 123: geticon.exe: win/geticon.c
! 124: $(LD) $(LDFLAGS) -o $@ win/geticon.c
! 125:
! 126: # convert gnuplot.doc to gnuplot.rtf
! 127: $(HELPFILE): doc2rtf.exe docs/gnuplot.doc win/wgnuplot.hpj
! 128: doc2rtf docs/gnuplot.doc win/gnuplot.rtf
! 129: $(HCW) -c -e win/wgnuplot.hpj
! 130:
! 131: doc2rtf.exe: docs/doc2rtf.c docs/termdoc.c docs/xref.c
! 132: $(LD) $(LDFLAGS) -o $@ $(CFLAGS) -I. -Idocs -Iterm $^
! 133:
! 134: #make binary demo files
! 135: $(M)bf_test.exe : bf_test.c dbinary.$(O) alloc.c
! 136: $(LD) $(LDFLAGS) $(CFLAGS) -I. -o $@ $^
! 137: (cd demo ; ./bf_test.exe )
! 138: # cd ..
! 139:
! 140: # _Windows causes wtext.h to define fread() etc
! 141: dbinary.$(O): binary.c
! 142: $(CC) -c $(CFLAGS) -o $@ $^
! 143:
! 144: #bf_test.$(O): bf_test.c
! 145: # $(CC) -c $(CFLAGS) -o $@ $^
! 146:
! 147: #alloc.$(O): alloc.c
! 148: # $(CC) -c $(CFLAGS) -o $@ $^
! 149:
! 150: # clean up temporary files
! 151: clean:
! 152: $(RM) *.$(O) wgnuplot.map wgnuplot.res win/gnuplot.rtf
! 153: $(RM) doc2rtf.exe win/wgnuplib.res wgnuplib.map wgnuplot.lib
! 154: $(RM) demo/bf_test.exe *.ico geticon.exe
! 155:
! 156: realclean: veryclean
! 157: veryclean: clean
! 158: $(RM) wgnuplot.exe wgnuplot.hlp wgnuplot.mnu wgnuplot.gid
! 159: $(RM) demo/binary[123] demo/fit.log demo/soundfit.par
! 160:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>