#
# Makefile for rayshade.
#
# Craig Kolb
#
# $Id: Makefile.SH,v 4.0 91/07/17 14:50:30 kolb Exp Locker: kolb $
#
# Bin directory
#
BINDIR = /pic/bin 
OPTIMIZE = -O2
URTINC = -I/pic/include
CCFLAGS = -fpcc-struct-return 
URTLIB = /pic/lib/librle.a
LDFLAGS =  -lm /usr/gnu/lib/libfl.a
CC = gcc
MKDEP = /pic/src/rayshade.4.0/mkdep
YACC = bison -y
CLC = 

LIBRAYDIR = ../libray
LIBSHADEDIR = ../libshade
INCLUDE = -I$(LIBRAYDIR) -I$(LIBSHADEDIR) -I.. $(URTINC)
YFLAGS = -d

LIBRAY = $(LIBRAYDIR)/libray.a
LIBSHADE = $(LIBSHADEDIR)/libshade.a

#
# If you are using LINDA, add -DLINDA
# If you are running 'tsnet'-style LINDA, add -DTSNET
# If you are running on a Multimax, add -DMULTIMAX -DSHAREDMEM
# 

CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)

#
# C-Linda flags, if appropriate
#CLFLAGS = -linda ts 20000
#

SHELL = /bin/sh

LIBS = $(LIBSHADE) $(LIBRAY) $(URTLIB)

DRIVE_C =	main.c raytrace.c version.c

DRIVE_H =	raytrace.h

DRIVE_O = $(DRIVE_C:.c=.o)

HFILES = $(DRIVE_H)

CFILES = $(DRIVE_C)

SHFILES = Makefile.SH

OBJ = $(DRIVE_O)

DEPENDSRC = $(DRIVE_C)

#
# Change $(CC) below to $(CLC) if using Linda.
#
rayshade: $(OBJ) $(LIBS)
	$(CC) $(OPTIMIZE) -static -o rayshade $(OBJ) $(LIBS) $(LDFLAGS)

#
# Uncomment the following rule if using Linda.
#
#raytrace.lo: raytrace.cl
#	$(CLC) $(INCLUDE) $(LCFLAGS) -c raytrace.cl

#
# End of configuration section
#
install:	rayshade
		mv rayshade $(BINDIR)/rayshade

clean:
	rm -f $(OBJ) core

realclean:
	rm -f $(OBJ) core y.tab.h
	rm -f *.orig Makefile

lint:
	lint $(CFLAGS) -x $(CFILES) -lm

tags:
	ctags -t $(CFILES)

depend:
	(sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
	 $(MKDEP) $(DEPENDSRC) | sed 's/: \.\//: /; /\/usr\/include/d' \
	) >Makefile.new
	cp Makefile Makefile.bak
	cp Makefile.new Makefile
	rm -f Makefile.new


# DO NOT DELETE THIS LINE
main.o: /pic/include/rle.h
main.o: /pic/include/rle_code.h
main.o: /pic/include/rle_raw.h
main.o: /pic/src/rayshade.4.0/config.h
main.o: /pic/src/rayshade.4.0/libray/libcommon/color.h
main.o: /pic/src/rayshade.4.0/libray/libcommon/common.h
main.o: /pic/src/rayshade.4.0/libray/libcommon/error.h
main.o: /pic/src/rayshade.4.0/libray/libcommon/expr.h
main.o: /pic/src/rayshade.4.0/libray/libcommon/ray.h
main.o: /pic/src/rayshade.4.0/libray/libcommon/transform.h
main.o: /pic/src/rayshade.4.0/libray/libcommon/vector.h
main.o: /pic/src/rayshade.4.0/libray/libobj/bounds.h
main.o: /pic/src/rayshade.4.0/libray/libobj/geom.h
main.o: /pic/src/rayshade.4.0/libshade/funcdefs.h
main.o: /pic/src/rayshade.4.0/libshade/options.h
main.o: /pic/src/rayshade.4.0/libshade/picture.h
main.o: /pic/src/rayshade.4.0/libshade/rayshade.h
main.o: /pic/src/rayshade.4.0/libshade/stats.h
main.o: /pic/src/rayshade.4.0/libshade/viewing.h
main.o: main.c
raytrace.o: /pic/include/rle.h
raytrace.o: /pic/include/rle_code.h
raytrace.o: /pic/include/rle_raw.h
raytrace.o: /pic/src/rayshade.4.0/config.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/color.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/common.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/error.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/expr.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/ray.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/sampling.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/transform.h
raytrace.o: /pic/src/rayshade.4.0/libray/libcommon/vector.h
raytrace.o: /pic/src/rayshade.4.0/libray/libobj/bounds.h
raytrace.o: /pic/src/rayshade.4.0/libray/libobj/geom.h
raytrace.o: /pic/src/rayshade.4.0/libray/libsurf/atmosphere.h
raytrace.o: /pic/src/rayshade.4.0/libray/libsurf/surface.h
raytrace.o: /pic/src/rayshade.4.0/libshade/funcdefs.h
raytrace.o: /pic/src/rayshade.4.0/libshade/options.h
raytrace.o: /pic/src/rayshade.4.0/libshade/picture.h
raytrace.o: /pic/src/rayshade.4.0/libshade/rayshade.h
raytrace.o: /pic/src/rayshade.4.0/libshade/stats.h
raytrace.o: /pic/src/rayshade.4.0/libshade/viewing.h
raytrace.o: raytrace.c
raytrace.o: raytrace.h
version.o: /pic/src/rayshade.4.0/config.h
version.o: /pic/src/rayshade.4.0/libray/libcommon/color.h
version.o: /pic/src/rayshade.4.0/libray/libcommon/common.h
version.o: /pic/src/rayshade.4.0/libray/libcommon/error.h
version.o: /pic/src/rayshade.4.0/libray/libcommon/expr.h
version.o: /pic/src/rayshade.4.0/libray/libcommon/ray.h
version.o: /pic/src/rayshade.4.0/libray/libcommon/transform.h
version.o: /pic/src/rayshade.4.0/libray/libcommon/vector.h
version.o: /pic/src/rayshade.4.0/libray/libobj/bounds.h
version.o: /pic/src/rayshade.4.0/libray/libobj/geom.h
version.o: /pic/src/rayshade.4.0/libshade/funcdefs.h
version.o: /pic/src/rayshade.4.0/libshade/rayshade.h
version.o: /pic/src/rayshade.4.0/libshade/stats.h
version.o: /pic/src/rayshade.4.0/patchlevel.h
version.o: version.c
