#
# a very simple makefile
# assumes you have main.c, main.h
# and other files all of which are similar, i.e. file.c and file.h
# all in the same directory
# and any *.c needs to recompile when any *.h changes
#
CC=gcc -O1 -std=c89 -Wall -pedantic
FILES = main.o file1.o file2.o\
file3.o etc.o
myprog: $(FILES)
$(CC) -o myprog $(FILES)
strip myprog
%.o: %.c *.h
$(CC) -o $*.o -c $*.c