#FLAGS=-arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4
CFLAGS=-Wall -O3 -g $(FLAGS)
CXXFLAGS=-Wall -O3 -g $(FLAGS)
CPPFLAGS=-DCOMPARISON_WITH_BSD -Iprograms -I/opt/local/include
#CPPFLAGS+=-fopenmp
LDFLAGS=-L/opt/local/lib
#LDLIBS=-lboost_thread-xgcc40-mt
LDLIBS=-lboost_thread

ALL=ex0 ex1 ex2 ex3 sort-bench sort-small-bench sort_r-bench sort

all: $(ALL)

ex1: ex1.cc sort_r.o
ex2: ex2.cc sort_r.o
ex3: ex3.cc sort_r.o
sort-bench: sort-bench.cpp sort_r.o
sort-small-bench: sort-small-bench.cpp sort_r.o
sort_r-bench: sort_r-bench.cpp sort_r.o
sort: sort.cpp sort_r.o

clean:
	rm -f $(ALL) sort_r.o
	rm -rf *.dSYM
