File: makefile.djg

package info (click to toggle)
gnuplot 3.5beta6.347-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 5,032 kB
  • ctags: 4,235
  • sloc: ansic: 42,086; makefile: 561; asm: 539; sh: 386; objc: 379; csh: 297; pascal: 194; perl: 138; lisp: 88
file content (118 lines) | stat: -rw-r--r-- 3,786 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# make file for DJGPP 
# compile it by   make -f makefile.djg

# where to place gnuplot.gih helpfile
HELPFILE = gnuplot.gih

# exe file will be  gp36.exe:
EXENAME = gp36

# compiler
CCDIR = c:\djgpp\bin\
CC = $(CCDIR)gcc
# include directory
INCLUDE = -I.
#INCLUDE = -I. -Ic:/djgpp/include

# djgpp vsn 1.* does not define time_t
#HBB: that's what NEED_TIME_T is meant to do...
#HBB: added $(OPTS) so the user can easily extend CFLAGS
CFLAGS = -DNEED_TIME_T -DMSDOS -DDOS32 -DDJGPP -DANSI_C -DREADLINE -DHAVE_STRNICMP -D_NAIVE_DOS_REGS -DPIPES $(OPTS)
TERMFLAGS = -DDJSVGA -DGRX20 -Ic:/gpp/v1/include/grx20
# The graphics libraries of djgpp are  -lgr -lgrx or -lgrx20.
# Choose one of them:
# HBB: if you choose -lgrx20 for DJGPP V1, add -DGRX20
#    (and perhaps -I....grx20) to TERMFLAGS!
#LINKOPT = -lm -lpc -lgr
#LINKOPT = -lm -lpc -lgrx
LINKOPT = -lm -lpc -lgrx20 $(OPTS)

CSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm \
        term/cgi.trm term/djsvga.trm term/dumb.trm \
        term/dxf.trm term/dxy.trm \
        term/debug.trm term/eepic.trm term/epson.trm term/fig.trm  \
        term/hp26.trm term/hp2648.trm term/hpgl.trm  \
        term/hpljii.trm term/metafont.trm\
        term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c 
CSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
        term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
        term/pbm.trm term/pc.trm 
CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
        term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \
        term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
OBJ1 =  bitmap.o command.o contour.o eval.o graphics.o graph3d.o hidden3d.o util3d.o
OBJ2 =  help.o internal.o misc.o parse.o plot.o plot2d.o plot3d.o readline.o
OBJ3 =  scanner.o set.o show.o specfun.o standard.o term.o time.o util.o
OBJ4 =  version.o binary.o interpol.o fit.o matrix.o datafile.o alloc.o ctrl87.o

OBJS =  $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)

.c.o:  
	$(CC) -c $(CFLAGS) $(INCLUDE) $<

all: $(EXENAME).exe $(HELPFILE)

$(EXENAME).exe : $(OBJS)
	$(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
#	strip $(EXENAME)
#HBB: keep a debuggable gp36 around
	objcopy --strip-all $(EXENAME) $(EXENAME).str
	coff2exe $(EXENAME).str
	del $(EXENAME).str
	@echo Rem: you need  go32  to run gnuplot

# This would copy go32 to the exe file
#$(EXENAME).exe : $(OBJS)
#       $(CC) -o $(EXENAME) $(OBJS) $(LINKOPT)
#       strip $(EXENAME)
#       copy /b $(CCDIR)\$(EXENAME).exe+$(EXENAME) $(EXENAME).exe
#       del $(EXENAME)


command.o: command.c plot.h setshow.h help.h
	$(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c

term.o: term.c term.h plot.h set.c show.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
	$(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c

$(OBJS): plot.h

command.o help.o misc.o: help.h

command.o graphics.o graph3d.o hidden3d.o util3d.o misc.o plot.o set.o show.o term.o interpol.o: setshow.h

command.o fit.o matrix.o: fit.h

fit.o matrix.o: matrix.h

bitmap.o term.o: bitmap.h

#HBB: ctrl87.c cannot be optimized, it seems...
ctrl87.o: ctrl87.c ctrl87.h
	gcc -c -g -Wall -O0 -m486 $<

# convert gnuplot.doc to gnuplot.gih
$(HELPFILE): doc2gih.exe docs\gnuplot.doc
	doc2gih docs/gnuplot.doc $(HELPFILE)

doc2gih.exe: docs\doc2gih.c
	$(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm -o doc2gih docs/doc2gih.c
	strip doc2gih
	coff2exe doc2gih
#	copy /b $(CCDIR)\go32.exe+doc2gih doc2gih.exe


# clean target - remove all temp files, but leave executable intact
# needed when changing configuration (model or overlaying)

clean:
	del *.o
	del $(EXENAME)
	del doc2gih

# realclean target - remove all files created by the makefile

realclean: clean
	del $(EXENAME).exe
	del doc2gih.exe
	del gnuplot.gih