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