
# $Header: /usr2/meuer/Geom_utilities/Matrix_util/RCS/Makefile,v 1.4 91/02/19 16:56:23 meuer Exp Locker: meuer $
#
# Makefile for the matrix manipulation library
# Mark Meuer
#
#
# The environment variable CPUTYPE must be set to iris4, sun3os3, sun3os4 or sun4


SUFFIXES=.c .C .o .h
.SUFFIXES: $(SUFFIXES)

NAME=libmatrix.a
MAKEFILE=Makefile
MAKEDIR=../Makefiles
DESTDIR = .
#Include machine specific things
include ${MAKEDIR}/mk.${CPUTYPE}

#CPLUSPLUS = g++
CPLUSPLUS = CC
AR=	/bin/ar

CONF=
IPATH= -I.
CFLAGS=	 ${MACHINE_CFLAGS} -g ${IPATH}
#CFLAGS=	 -g ${IPATH}

HDRS = 

SRCS = \
	add_vectors.c \
	ang_from_y.c \
	ang_from_z.c  \
	copy_matrix.c \
	copy_vector.c \
	cross_prod.c \
	debug.c \
	dot_prod.c \
	errors.c \
	general_rot.c \
	identity_mat.c \
	matrix_mult.c \
	matrix_print.c \
	mult_v_by_s.c \
	normalize_vec.c \
	open_file.c \
	print_vector.c \
	scale_mat.c \
	shear.c \
	trans_scale.c \
	transform_pt.c \
	transform_vec.c \
	translation.c \
	transpose_mat.c \
	vector_norm.c \
	x_rotation.c \
	y_rotation.c \
	z_rotation.c

OBJS = \
	add_vectors.o \
	ang_from_y.o \
	ang_from_z.o \
	copy_matrix.o \
	copy_vector.o \
	cross_prod.o \
	debug.o \
	dot_prod.o \
	errors.o \
	general_rot.o \
	identity_mat.o \
	matrix_mult.o \
	matrix_print.o \
	mult_v_by_s.o \
	normalize_vec.o \
	open_file.o \
	print_vector.o \
	scale_mat.o \
	shear.o \
	trans_scale.o \
	transform_pt.o \
	transform_vec.o \
	translation.o \
	transpose_mat.o \
	vector_norm.o \
	x_rotation.o \
	y_rotation.o \
	z_rotation.o

all:	${NAME}
	etags *.c *.h

${NAME}: ${OBJS} Makefile 
	ar ruv ${NAME} ${OBJS}
	${RANLIB} ${NAME}

${OBJS} :  matrix.h

clean: 
	-rm -f *.o *~ *.dvi *.aux *.ps core 

purge: clean
	-rm -f ${NAME}

install: all
	@echo "Using Makefile settings for machine ${CPUTYPE}."
	cp ${NAME} ${LIB_DIR}
	chmod a+r ${LIB_DIR}/${NAME}
	(cd Document; ${MAKE} install)
.C.o: 
	${CPLUSPLUS} -c ${CFLAGS} $<

