Click on Makefile to get source.
# set compiler used for building program
CC = gcc
# gnu options
GCCOPTS = -Wall -ansi -std=c99
# sun options
CCOPTS =
# options for c compiler
COPTS = $(GCCOPTS)
main.o: main.c
$(CC) -c $(COPTS) main.c
bar.o: bar.c
$(CC) -c $(COPTS) bar.c
a.out: main.o bar.o
$(CC) main.o bar.o
# phony so that is there is a file name clean
# dependency does not get checked
.PHONY: clean
clean:
/bin/rm -f *.o a.out mybin
.PHONY: all
all: a.out
echo "Done!"
highlight:
../../C++Examples/make_hl_html main.c c ../
../../C++Examples/make_hl_html bar.c c ../
Makefile.html: Makefile
../../C++Examples/make_hl_html Makefile Makefile ../