# Make file for Lab Exercise 3 - Windows version # WRITTEN BY: Michael Main (main@colorado.edu), Sep 17, 2000 # # This makefile is used as follows to regenerate files for the demo2 program: # make throttle.o -- Regenerates throttle.o by compiling # make demo2.o -- Regenerates demo2.o by compiling # make demo2.exe -- Regenerates the executable demo2 file by compiling # make -- Same as "make demo2.exe" # # Two special targets may also be used with this makefile: # make all -- Regenerates all files listed above # make clean -- Erases all files listed above # # All compilations occur with -Wall and -gstabs. # The clean command uses rm to remove all expendable files (rm is part of # the cs1300 compiler tools from www.cs.colorado.edu/~main/cs1300/README.html). # This section sets the $(SUFFIX) and $RM) variables depending on whether # the operating system is Windows or Unix. ifdef COMSPEC SUFFIX = .exe RM = del else SUFFIX = RM = rm -f endif demo2$(SUFFIX): throttle.o demo2.o g++ -Wall -gstabs demo2.o throttle.o -lm -o demo2 throttle.o: throttle.h throttle.cxx g++ -Wall -c -gstabs throttle.cxx demo2.o: throttle.h demo2.cxx g++ -Wall -c -gstabs demo2.cxx clean: $(RM) demo2$(SUFFIX) $(RM) demo2.o $(RM) throttle.o all: @make demo2