CC = gcc
CFLAGS = -g -Wall

all: mkzombie mkzombie2 prexit showwait

# The variable $@ has the value of the target. 
# The variable $^ holds all prerequisites.
# The variable $< holds the first prerequisite.

mkzombie: mkzombie.o
	${CC} ${CFLAGS} -o $@ $^

mkzombie2: mkzombie2.o
	${CC} ${CFLAGS} -o $@ $^ 

prexit: prexit.o 
	${CC} ${CFLAGS} -o $@ $^

showwait: showwait.o
	${CC} ${CFLAGS} -o $@ $^

usefiles: usefiles.o
	${CC} ${CFLAGS} -o $@ $^
buffer: buffer.o
	${CC} ${CFLAGS} -o $@ $^

%.o: %.c
	${CC} ${CFLAGS}  -c $<

clean:
	rm *.o 
