# Makefile for Chromatics CX3d RLE get program

#
# DEST is where to install it
# RI is the include directory for RLE files
# RL is the library directory (for librle.a)
# CX3DI is where CX3D includes are

DEST	=	../../../bin
RI	=	../../include
RL	=	../../lib
CX3DI	=	/usr/site/include

# -lcx3d is Chromatics CX3d library
LIBES 	=	$(RL)/librle.a -lcx3d -lm
CFLAGS	=	-O $(DFLAGS) $(IFLAGS)
IFLAGS	=	-I. -I$(RI) -I$(CX3DI)

# System V make pays attention to the SHELL environment variable. Override it.
SHELL = /bin/sh

all		:	getcx3d.out

# Executables.  The .out will be stripped off in the install action.

getcx3d.out	:	getcx3d.o gamma.o sig.o
			cc $(CFLAGS) -o getcx3d.new \
				getcx3d.o gamma.o sig.o $(LIBES)
			mv getcx3d.new getcx3d.out

# Incremental install, copies executable to DEST dir.
install		:	install-pgm
install-pgm	:	getcx3d.out
			cp getcx3d.out $(DEST)/getcx3d
			touch install-pgm

# Clean up installed binaries
pristine	:
			-rm -f $(DEST)/getcx3d
			-rm -f install-pgm

# Clean up binaries
clean		:
			rm -f *.out core *.o errs m.err

lint		:
			lint $(RI) getcx3d.c gamma.c sig.c

# Keep Alpha1 global make happy.
makefile:
depend:

# Dependencies
gamma.o:	round.h
getcx3d.o:	$(CX3DI)/cx3d_types.h $(CX3DI)/cx3d_solid.h
getcx3d.o:	$(RI)/svfb_global.h gamma.h sig.h
