Click on Makefile to get source.
# set compiler used for builing program
CC = gcc
# gnu options
GCCOPTS = -Wall -ansi -g
# sun options
CCOPTS =
# options for c compiler
COPTS = $(GCCOPTS)
#ADOTOUT = a.exe
ADOTOUT = a.out
#
$(ADOTOUT): helloworld.c
$(CC) $(COPTS) helloworld.c
arrays: arrays.c
$(CC) $(COPTS) -o arrays arrays.c
first_pgm: first_pgm.c
$(CC) $(COPTS) -o first_pgm first_pgm.c
#
# before execution: export QUERY_STRING=c=10
first_pgm_cgi_get: first_pgm_cgi_get.c
$(CC) $(COPTS) -o first_pgm_cgi_get first_pgm_cgi_get.c
#
first_pgm_cgi: first_pgm_cgi.c
$(CC) $(COPTS) -o first_pgm_cgi first_pgm_cgi.c
# must indicate math lib: -lm
math: math.c
$(CC) $(COPTS) -std=c99 math.c -lm -o math
clean:
/bin/rm -f *.o a.out a2.out *.ps arrays arrays.ps *.exe first_pgm first_pgm_cgi first_pgm_cgi_get math
all: $(ADOTOUT) arrays first_pgm first_pgm_cgi_get first_pgm_cgi_get first_pgm_cgi math
echo "Done!"
highlight:
../C++Examples/make_hl_html arrays.c c
../C++Examples/make_hl_html first_pgm.c c
../C++Examples/make_hl_html first_pgm_cgi.c c
../C++Examples/make_hl_html first_pgm_cgi_get.c c
../C++Examples/make_hl_html helloworld.c c
../C++Examples/make_hl_html mainarg.c c
../C++Examples/make_hl_html math.c c
../C++Examples/make_hl_html math_old.c c
../C++Examples/make_hl_html pi1.c c
../C++Examples/make_hl_html ptrs2fncs.c c
../C++Examples/make_hl_html rand2.c c
../C++Examples/make_hl_html rand.c c
../C++Examples/make_hl_html scanf.c c
../C++Examples/make_hl_html selfprint2.c c
../C++Examples/make_hl_html selfprint3.c c
../C++Examples/make_hl_html selfprint.c c
../C++Examples/make_hl_html types.c c
Makefile.html: Makefile
../C++Examples/make_hl_html Makefile Makefile
arrays.c.html: arrays.c
../C++Examples/make_hl_html arrays.c c
first_pgm.c.html: first_pgm.c
../C++Examples/make_hl_html first_pgm.c c
first_pgm_cgi.c.html: first_pgm_cgi.c
../C++Examples/make_hl_html first_pgm_cgi.c c
first_pgm_cgi_get.c.html: first_pgm_cgi_get.c
../C++Examples/make_hl_html first_pgm_cgi_get.c c
helloworld.c.html: helloworld.c
../C++Examples/make_hl_html helloworld.c c
mainarg.c.html: mainarg.c
../C++Examples/make_hl_html mainarg.c c
math.c.html: math.c
../C++Examples/make_hl_html math.c c
math_old.c.html: math_old.c
../C++Examples/make_hl_html math_old.c c
pi1.c.html: pi1.c
../C++Examples/make_hl_html pi1.c c
ptrs2fncs.c.html: ptrs2fncs.c
../C++Examples/make_hl_html ptrs2fncs.c c
rand.c.html: rand.c
../C++Examples/make_hl_html rand.c c
rand2.c.html: rand2.c
../C++Examples/make_hl_html rand2.c c
scanf.c.html: scanf.c
../C++Examples/make_hl_html scanf.c c
selfprint.c.html: selfprint.c
../C++Examples/make_hl_html selfprint.c c
selfprint2.c.html: selfprint2.c
../C++Examples/make_hl_html selfprint2.c c
selfprint3.c.html: selfprint3.c
../C++Examples/make_hl_html selfprint3.c c
types.c.html: types.c
../C++Examples/make_hl_html types.c c
html: Makefile.html arrays.c.html first_pgm.c.html first_pgm.html first_pgm_cgi.c.html first_pgm_cgi_get.c.html first_pgm_get.html helloworld.c.html index.html mainarg.c.html math.c.html math_old.c.html pi1.c.html ptrs2fncs.c.html rand.c.html rand2.c.html scanf.c.html selfprint.c.html selfprint2.c.html selfprint3.c.html types.c.html
echo "Made *.c.html files"
arrays.ps: arrays.c
a2ps -v --columns=1 -f 14 --no-header --borders no \
--landscape --output=arrays.ps arrays.c