[BACK]Return to makefile.djg CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

File: [local] / OpenXM_contrib / gnuplot / Attic / makefile.djg (download)

Revision 1.1.1.2 (vendor branch), Mon Sep 15 07:09:23 2003 UTC (20 years, 8 months ago) by ohara
Branch: GNUPLOT
CVS Tags: VERSION_3_7_3, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX
Changes since 1.1.1.1: +2 -2 lines

Import gnuplot 3.7.3

# 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/pdf.trm term/pc.trm 
CSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm term/svg.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

show.o: show.c plot.h setshow.h
	$(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" show.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 docs\termdoc.c
	$(CC) $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm -o doc2gih docs/doc2gih.c docs/termdoc.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