########################################################################### ## Columbia University Introduction to Computer Programming in C COMS 1003 ## Makefile for examples ## ## Copyright (C) 2005 Michael E. Locasto ## ## All rights reserved. ## ## $Id: Makefile,v 1.23 2005/12/06 14:14:53 locasto Exp $ ########################################################################### ## Variables ## CC=gcc CCFLAGS= -Wall -g EXECUTABLE_LIST=hello onerand showsize consttest bittest echoargs argtest \ shoutarg arrayquiz boolexp mathline fact tt callvalue \ statictest scopes advancedata functionquiz midterm song \ printscores printscores-first printscores-wrong \ calcscores echoin hi mycat pointerstring pointermath \ basicpointers functionptr carorder hash sorts scanf-test \ shellsort bigo ## Targets ## all: @echo "nothing to be done for 'make all' -- use individual targets" hello: hello.c $(CC) $(CCFLAGS) -o hello hello.c onerand: onerand.c $(CC) $(CCFLAGS) -o onerand onerand.c showsize: showsize.c $(CC) $(CCFLAGS) -o showsize showsize.c consttest: consttest.c $(CC) $(CCFLAGS) -o consttest consttest.c bittest: bittest.c $(CC) $(CCFLAGS) -o bittest bittest.c echoargs: echoargs.c $(CC) $(CCFLAGS) -o echoargs echoargs.c argtest: argtest.c $(CC) $(CCFLAGS) -o argtest argtest.c shoutarg: shoutarg.c $(CC) $(CCFLAGS) -o shoutarg shoutarg.c arrayquiz: arrayquiz.c $(CC) $(CCFLAGS) -o arrayquiz arrayquiz.c boolexp: boolexp.c $(CC) $(CCFLAGS) -o boolexp boolexp.c mathline: mathline.c $(CC) $(CCFLAGS) -o mathline mathline.c fact: fact.c $(CC) $(CCFLAGS) -o fact fact.c tt: typedeftest.c $(CC) $(CCFLAGS) -o tt typedeftest.c callvalue: callvalue.c $(CC) $(CCFLAGS) -o callvalue callvalue.c statictest: statictest.c $(CC) $(CCFLAGS) -o statictest statictest.c scopes: scopes.c $(CC) $(CCFLAGS) -o scopes scopes.c advancedata: advancedata.c $(CC) $(CCFLAGS) -o advancedata advancedata.c functionquiz: functionquiz.c $(CC) $(CCFLAGS) -o functionquiz functionquiz.c midterm: midterm.c $(CC) $(CCFLAGS) -o midterm midterm.c song: song.c $(CC) $(CCFLAGS) -o song song.c printscores-first: printscores-first.c $(CC) $(CCFLAGS) -o printscores-first printscores-first.c printscores-wrong: printscores-wrong.c $(CC) $(CCFLAGS) -o printscores-wrong printscores-wrong.c printscores: printscores.c $(CC) $(CCFLAGS) -o printscores printscores.c calcscores: calcscores.c $(CC) $(CCFLAGS) -o calcscores calcscores.c echoin: echoin.c $(CC) $(CCFLAGS) -o echoin echoin.c hi: hi.c $(CC) $(CCFLAGS) -o hi hi.c cat: cat.c $(CC) $(CCFLAGS) -o mycat cat.c pointerstring: pointerstring.c $(CC) $(CCFLAGS) -o pointerstring pointerstring.c pointermath: pointermath.c $(CC) $(CCFLAGS) -o pointermath pointermath.c basicpointers: basicpointers.c $(CC) $(CCFLAGS) -o basicpointers basicpointers.c functionptr: functionptr.c $(CC) $(CCFLAGS) -o functionptr functionptr.c carorder: carorder.c $(CC) $(CCFLAGS) -o carorder carorder.c hash: hash.c $(CC) $(CCFLAGS) -o hash hash.c sorts: sorts.c $(CC) $(CCFLAGS) -o sorts sorts.c scanf-test: scanf-test.c $(CC) $(CCFLAGS) -o scanf-test scanf-test.c shellsort: shellsort.c $(CC) $(CCFLAGS) -o shellsort shellsort.c bigo: bigo.c $(CC) $(CCFLAGS) -o bigo bigo.c clean: @/bin/rm -f $(EXECUTABLE_LIST) *~ *.o *.s a.out