# Makefile for cs6420 project 1 .SILENT: CC =/usr/local/bin/gcc CFLAGS=-g -Wall RM =/usr/bin/rm WC =/usr/ucb/wc ECHO =/usr/bin/echo TEE =/usr/bin/tee CUT =/usr/bin/cut EXTRA_LIBS= -lm # Rule for making .o from .c %.o: %.c $(ECHO) Compiling $* $(RM) -f $*.o $(CC) $(CFLAGS) $(EXTRA_INCLUDES) -c $*.c 2>&1 | $(TEE) $*.errors @if [ `$(WC) -l $*.errors | $(CUT) -c1-8` = 0 ] ; then \ rm $*.errors; \ exit 0; \ else \ exit 1; \ fi testgt: testgt.o gthreads.o $(ECHO) Linking $* $(CC) $(CFLAGS) -o testgt testgt.o gthreads.o $(LIBS) $(EXTRA_LIBS) testgt.o: testgt.c gthreads.h gthreads.o: gthreads.c gthreads.h clean: $(RM) *.o $(ECHO) Cleaned!