# This is a very simple makefile
# When you type ``make'' at the prompt in a directory that
# contains two source files, file1.c and file2.c, the
# program ``prog'' will be compiled and linked with the
# appropriate flags and using the right compiler

# Specify the C-compiler
CC = cc

# What options to compile with? i.e. -g or -O
CFLAGS = -g

# What libraries? i.e. -lm for math library
LIBS = -lm

# The name of the program
PROG = myprog

# List all object files in the program
OBJS = file1.o file2.o

$(PROG):        $(OBJS)
                $(CC) -o $@ $(OBJS) $(LIBS)

# Dependencies for each .o file
file1.o: file.h
file2.o: file.h
