# Sample makefile for building debuggable executables from CLU sources

CLU     = ${CLUHOME}/exe/pclu                      # the compiler
CFLAGS  = -I${CLUHOME}/include/debug -w -g -G 4 -c # flags to the C compiler
LDFLAGS = -L${CLUHOME}/code -lpclu -lm  # flags to the C linker

OBJS = factorial.o 

factorial: ${OBJS}
	${CC} -x -non_shared -G 4 -o $@ ${OBJS} ${LDFLAGS}

factorial.o: factorial.clu
	rm -f factorial.c
	${CLU} -ext false -spec factorial -co factorial

clean:
	rm -f ${OBJS} factorial factorial.c factorial.sym factorial.bkpts
