# Tiny simple UNIX Makefile
# Orion Sky Lawlor, olawlor@acm.org, 2005/04/21 (Public Domain)
#
CXXFLAGS+=-I. $(OPTS)
LIBS=-lm -lpthread

all:  test

# Make problem<i> from problem<i>.cpp
%: %.cpp 
	$(CXX) $(CXXFLAGS) $< -o $@ $(LIBS)

test: test_problem1 test_problem2 test_problem3 test_problem4

test_problem1: problem1 test.1m
	./problem1

test_problem2: problem2 test.1m
	./problem2

test_problem3: problem3
	./problem3

test_problem4: problem4
	./problem4

clean:
	-rm *.o problem1 problem2 problem3 problem4 a.out

test.1m:
	dd if=/dev/zero of=test.1m bs=1024k count=1
