############################################### # makefile4: Macros ############################################### RELEASE_OPTIONS = DEBUG_OPTIONS = -g RELEASE_OBJS = teststack.o stack.o DEBUG_OBJS = teststack.do stack.do RELEASE_EXEC = teststack DEBUG_EXEC = teststackgdb all: release debug release: teststack debug: teststackgdb clobber: clean rm -f *~ \#*\# core clean: rm -f $(RELEASE_EXEC) $(DEBUG_EXEC) $(RELEASE_OBJS) $(DEBUG_OBJS) $(RELEASE_EXEC): $(RELEASE_OBJS) gcc -o $@ $(RELEASE_OBJS) $(DEBUG_EXEC): $(DEBUG_OBJS) gcc -o $@ $(DEBUG_OBJS) teststack.o: teststack.c stack.h gcc $(RELEASE_OPTIONS) -c -o $@ teststack.c teststack.do: teststack.c stack.h gcc $(DEBUG_OPTIONS) -c -o $@ teststack.c stack.o: stack.c stack.h gcc $(RELEASE_OPTIONS) -c -o $@ stack.c stack.do: stack.c stack.h gcc $(DEBUG_OPTIONS) -c -o $@ stack.c