# the compiler: gcc for C program
CC = gcc

# compiler flags:
#  -g    adds debugging information to the executable file
#  -Wall turns on most, but not all, compiler warnings
CFLAGS	=	-g -Wall

# the build target executable:
TARGET = stack

$(TARGET): main.o stack.o io.o
	$(CC) $(CFLAGS) -o stack main.o stack.o io.o
main.o: main.c main.h
	$(CC) -c main.c
io.o: io.c io.h
	$(CC) -c io.c
stack.o: stack.c stack.h
	$(CC) -c stack.c
