#
# Makefile for CS 70 Assignment 6, Spring 2002
# 
# Although you can use make without understanding what exactly this file
# means, you should now know enough to follow exactly how it works.  As
# usual, you can build this software by typing
#
#     make
#

# ----- Make Macros -----

CXXFLAGS =	-g -Wall -W -pedantic
CXX	=	g++

TARGETS =	shuffle
OBJECTS =	shuffle.o lineshuffler.o random.o 

# ----- Make Rules -----

all:	$(TARGETS)

shuffle:	$(OBJECTS)
	$(CXX) $(CXXFLAGS) -o shuffle $(OBJECTS)

clean:
	rm -f $(TARGETS) $(OBJECTS)


# This last target depends on GNU Make and Perl.  You don't need to
# understand this piece of code.  The perl one-liner delete the old
# dependencies and the gcc line adds the new ones.

depend:
	perl -i~ -lpe 'if (m/^# -+(8<-+)+\s*\z/) { print; last; }' Makefile
	gcc -MM $(OBJECTS:.o=.cpp) >> Makefile

# ---- Automatic Rules (generated by typing ``make depend'') ----
# Do edit beneath this line, your changes will be lost when make depend is run.

# ----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----
shuffle.o: shuffle.cpp lineshuffler.hpp random.hpp shuffle-private.hpp
lineshuffler.o: lineshuffler.cpp lineshuffler.hpp random.hpp
random.o: random.cpp random.hpp
