bin@rhesus.primate.wisc.edu (Brain in Neutral) (07/11/88)
This is a question about compiling plot3d from the CRC plotting package published to comp.sources.unix some time ago. The src directory looks like this after unshar-ing: Makefile crc.h genfont.c qplot.c subr.f axis.c crclabel.c ifont.5x7 scale.c test.f axis_.c draw.f newtru.f setaxs.f xyaxes.c axisv_.c draxis.c plot3d.c strip7.c "make -n plot3d" gives this: f77 -c draw.f f77 -c newtru.f f77 -c setaxs.f f77 -c subr.f f77 -c test.f cd ../lib;make all cc -O -n draw.o newtru.o setaxs.o subr.o test.o -o plot3d ../lib/libG.a -lI77 -lU77 -lF77 -lm It seems odd that plot3d.c would not be compiled. Looking into the Makefile, I find: OBJ = qplot.o plot3d.o crclabel.o strip7.o \ axis.o axis_.o axisv_.o draxis.o plot3dres.o scale.o xyaxes.o genfont.o FOBJ = draw.o newtru.o setaxs.o subr.o test.o plot3d: $(OBJS) $(FOBJ) $(GRAPHICSLIB) ${CC} $(CFLAGS) $(OBJS) $(FOBJ) -o plot3d $(GRAPHICSLIB) -lI77 -lU77 -lF77 -lm Note that OBJS is not defined anywhere is the rest of the Makefile. It does no good to change OBJS to OBJ for making plot3d - then you get all the objects for the rest of the programs in the package. Anyway, plot3dres.c is nowhere to be found. "make plot3dres.o" yields: co plot3dres.c co error: Can't find RCS/plot3dres.c,v nor plot3dres.c,v *** Error code 1 Stop. So what gives? Anyone got the missing pieces?
roy@phri.UUCP (Roy Smith) (07/12/88)
bin@rhesus.primate.wisc.edu (Brain in Neutral) writes: > question about compiling plot3d from the CRC plotting package By an amazing coincidence, I just put crc plot up this afternoon! Of course, I ran into the same problems. My solution was just to add plot3d.o to the cc line for plot3d; seems to work fine. The Makefile is a mess. The more I looked at it, the less it made sense. Aside from the non-definition of OBJS, I noticed that while some of the cc lines had $(CFLAGS), some didn't (so, when I changed CFLAGS, not all the cc lines got changed). On top of that, the shar files had chdirs in them instead of cds (the BSD /bin/sh apparantly only recognizes cd, not chdir, much to my surprise); a quick run through sed fixed that. Let's not even talk about the fact that some parts are written in Fortran and some in C. Anyway, what follows is a context diff between my latest version of the Makefile for the src directory and the one that was distributed. If you're having trouble getting crcplot up and running, keep plugging at it. For all the grossness in the code and distribution kit, it's really a nice package and well worth the effort. I do wish, however, that the authors would release a revamped and cleaned-up version. BTW, plot3d takes the prized for the most options in a single program; more by several fold than even sa! ----------------context diff starts here---------------- *** tmp/Makefile Mon Jul 11 21:15:13 1988 --- src/Makefile Mon Jul 11 15:35:48 1988 *************** *** 6,17 **** # 9/26/86 # ! BIN= ${DESTDIR}/usr/unsup/bin ! LIB= ${DESTDIR}/usr/unsup/lib/crc ! GRAPHICSLIB=../lib/libG.a ! OWNER = binary ! GROUP = system MODE = 751 SHMODE = 755 SUMODE = 4751 --- 6,17 ---- # 9/26/86 # ! BIN= ${DESTDIR}/usr/local/bin ! LIB= ${DESTDIR}/usr/local/lib/crc ! GRAPHICSLIB=${DESTDIR}/usr/local/lib/crc/libG.a ! OWNER = bin ! GROUP = wheel MODE = 751 SHMODE = 755 SUMODE = 4751 *************** *** 20,26 **** INCLUDE = CDEFS = ! CFLAGS = -O -n ${CDEFS} ${INCLUDE} HDR = # Use this set if you want the drivers; it includes gd gp gplp hpd --- 20,26 ---- INCLUDE = CDEFS = ! CFLAGS = -g -n ${CDEFS} ${INCLUDE} HDR = # Use this set if you want the drivers; it includes gd gp gplp hpd *************** *** 41,68 **** all: qplot plot3d crclabel strip7 font.5x7 qplot: qplot.c $(GRAPHICSLIB) ! ${CC} -O qplot.c $(GRAPHICSLIB) -lm -o qplot ! plot3d: $(OBJS) $(FOBJ) $(GRAPHICSLIB) ! ${CC} $(CFLAGS) $(OBJS) $(FOBJ) -o plot3d $(GRAPHICSLIB) -lI77 -lU77 -lF77 -lm # # gd: gd.c $(GRAPHICSLIB) ! # ${CC} -O gd.c $(GRAPHICSLIB) -lm -o gd # # gp: gp.c $(GRAPHICSLIB) ! # ${CC} -O gp.c $(GRAPHICSLIB) -lm -o gp # # gplp: gplp.c $(GRAPHICSLIB) ! # ${CC} -O gplp.c $(GRAPHICSLIB) -lm -o gplp # # hpd: hpd.c $(GRAPHICSLIB) ! # ${CC} -O hpd.c $(GRAPHICSLIB) -lm -o hpd crclabel: crclabel.c $(GRAPHICSLIB) ! ${CC} -O crclabel.c $(GRAPHICSLIB) -lm -o crclabel strip7: strip7.c $(GRAPHICSLIB) ! ${CC} -O strip7.c $(GRAPHICSLIB) -lm -o strip7 font.5x7: ifont.5x7 genfont ./genfont font.5x7 ifont.5x7 --- 41,68 ---- all: qplot plot3d crclabel strip7 font.5x7 qplot: qplot.c $(GRAPHICSLIB) ! ${CC} -g qplot.c $(GRAPHICSLIB) -lm -o qplot ! plot3d: plot3d.o $(FOBJ) $(GRAPHICSLIB) ! f77 $(CFLAGS) plot3d.o $(FOBJ) -o plot3d $(GRAPHICSLIB) -lm # # gd: gd.c $(GRAPHICSLIB) ! # ${CC} -g gd.c $(GRAPHICSLIB) -lm -o gd # # gp: gp.c $(GRAPHICSLIB) ! # ${CC} -g gp.c $(GRAPHICSLIB) -lm -o gp # # gplp: gplp.c $(GRAPHICSLIB) ! # ${CC} -g gplp.c $(GRAPHICSLIB) -lm -o gplp # # hpd: hpd.c $(GRAPHICSLIB) ! # ${CC} -g hpd.c $(GRAPHICSLIB) -lm -o hpd crclabel: crclabel.c $(GRAPHICSLIB) ! ${CC} -g crclabel.c $(GRAPHICSLIB) -lm -o crclabel strip7: strip7.c $(GRAPHICSLIB) ! ${CC} -g strip7.c $(GRAPHICSLIB) -lm -o strip7 font.5x7: ifont.5x7 genfont ./genfont font.5x7 ifont.5x7 -- Roy Smith, System Administrator Public Health Research Institute {allegra,philabs,cmcl2,rutgers}!phri!roy -or- phri!roy@uunet.uu.net "The connector is the network"