CFLAGS=-Wall -g

FILES = *.c *.h Makefile

######################################################################
# Standard Targets

default: array-stack-expt array-queue-expt linked-stack-expt linked-queue-expt

.PHONY: clean
clean:
	rm -f *.o 
	rm -f *.gch

.PHONY: distclean
distclean: clean
	rm -f *utest *expt

.PHONY: tarball
tarball: linear.tar


######################################################################
# Primary Targets

array-stack-expt: array-stack.o linear-expt.o mem.o
	$(LINK.o) -o $@ $^

array-queue-expt: array-queue.o linear-expt.o mem.o
	$(LINK.o) -o $@ $^

linked-stack-expt: linked-stack.o linear-expt.o mem.o
	$(LINK.o) -o $@ $^

linked-queue-expt: linked-queue.o linear-expt.o mem.o
	$(LINK.o) -o $@ $^

linear.tar: $(FILES)
	tar cvf $@ $(FILES)


######################################################################
# Dependencies
