Xref: utzoo comp.sources.d:2451 comp.graphics:2772
Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!cmcl2!phri!roy
From: roy@phri.UUCP (Roy Smith)
Newsgroups: comp.sources.d,comp.graphics
Subject: Re: CRC graphics package compilation problem
Message-ID: <3379@phri.UUCP>
Date: 12 Jul 88 01:32:01 GMT
References: <338@rhesus.primate.wisc.edu>
Reply-To: roy@phri.UUCP (Roy Smith)
Organization: Public Health Research Inst. (NY, NY)
Lines: 134

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"