Annotation of OpenXM_contrib/gnuplot/makefile.djg, Revision 1.1.1.1
1.1 maekawa 1: # make file for DJGPP
2: # compile it by make -f makefile.djg
3:
4: # where to place gnuplot.gih helpfile
5: HELPFILE = gnuplot.gih
6:
7: # exe file will be gp36.exe:
8: EXENAME = gp36
9:
10: # compiler
11: CCDIR = c:\djgpp\bin\
12: CC = $(CCDIR)gcc
13: # include directory
14: INCLUDE = -I.
15: #INCLUDE = -I. -Ic:/djgpp/include
16:
17: # djgpp vsn 1.* does not define time_t
18: #HBB: that's what NEED_TIME_T is meant to do...
19: #HBB: added $(OPTS) so the user can easily extend CFLAGS
20: CFLAGS = -DNEED_TIME_T -DMSDOS -DDOS32 -DDJGPP -DANSI_C -DREADLINE -DHAVE_STRNICMP -D_NAIVE_DOS_REGS -DPIPES $(OPTS)
21: TERMFLAGS = -DDJSVGA -DGRX20 -Ic:/gpp/v1/include/grx20
22: # The graphics libraries of djgpp are -lgr -lgrx or -lgrx20.
23: # Choose one of them:
24: # HBB: if you choose -lgrx20 for DJGPP V1, add -DGRX20
25: # (and perhaps -I....grx20) to TERMFLAGS!
26: #LINKOPT = -lm -lpc -lgr
27: #LINKOPT = -lm -lpc -lgrx
28: LINKOPT = -lm -lpc -lgrx20 $(OPTS)
29:
30: CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm \
31: term/cgi.trm term/djsvga.trm term/dumb.trm \
32: term/dxf.trm term/dxy.trm \
33: term/debug.trm term/eepic.trm term/epson.trm term/fig.trm \
34: term/hp26.trm term/hp2648.trm term/hpgl.trm \
35: term/hpljii.trm term/metafont.trm\
36: term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
37: CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
38: term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
39: term/pbm.trm term/pc.trm
40: CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
41: term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \
42: term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
43: OBJ1 = bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o
44: OBJ2 = help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o
45: OBJ3 = scanner.o set.o show.o specfun.o standard.o term.o time.o util.o
46: OBJ4 = version.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o ctrl87.o
47:
48: OBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
49:
50: .c.o:
51: $(CC) -c $(CFLAGS) $(INCLUDE) $<
52:
53: all: $(EXENAME).exe $(HELPFILE)
54:
55: $(EXENAME).exe : $(OBJS)
56: $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
57: # strip $(EXENAME)
58: #HBB: keep a debuggable gp36 around
59: objcopy --strip-all $(EXENAME) $(EXENAME).str
60: coff2exe $(EXENAME).str
61: del $(EXENAME).str
62: @echo Rem: you need go32 to run gnuplot
63:
64: # This would copy go32 to the exe file
65: #$(EXENAME).exe : $(OBJS)
66: # $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
67: # strip $(EXENAME)
68: # copy /b $(CCDIR)\$(EXENAME).exe+$(EXENAME) $(EXENAME).exe
69: # del $(EXENAME)
70:
71:
72: command.o: command.c plot.h setshow.h help.h
73: $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c
74:
75: show.o: show.c plot.h setshow.h
76: $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" show.c
77:
78: term.o: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
79: $(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c
80:
81: $(OBJS): plot.h
82:
83: command.o help.o misc.o: help.h
84:
85: command.o graphics.o graph3d.o hidden3d.o util3d.o misc.o plot.o set.o show.o term.o interpol.o: setshow.h
86:
87: command.o fit.o matrix.o: fit.h
88:
89: fit.o matrix.o: matrix.h
90:
91: bitmap.o term.o: bitmap.h
92:
93: #HBB: ctrl87.c cannot be optimized, it seems...
94: ctrl87.o: ctrl87.c ctrl87.h
95: gcc -c -g -Wall -O0 -m486 $<
96:
97: # convert gnuplot.doc to gnuplot.gih
98: $(HELPFILE): doc2gih.exe docs\gnuplot.doc
99: doc2gih docs/gnuplot.doc $(HELPFILE)
100:
101: doc2gih.exe: docs\doc2gih.c docs\termdoc.c
102: $(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm -o doc2gih docs/doc2gih.c docs/termdoc.c
103: strip doc2gih
104: coff2exe doc2gih
105: # copy /b $(CCDIR)\go32.exe+doc2gih doc2gih.exe
106:
107:
108: # clean target - remove all temp files, but leave executable intact
109: # needed when changing configuration (model or overlaying)
110:
111: clean:
112: del *.o
113: del $(EXENAME)
114: del doc2gih
115:
116: # realclean target - remove all files created by the makefile
117:
118: realclean: clean
119: del $(EXENAME).exe
120: del doc2gih.exe
121: del gnuplot.gih
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>