# EXAMPLE_BIN= screenshot
# include ../Makefile.conf
# screenshot: Intermediate/screenshot.o
#	$(CXX) Intermediate/screenshoot.o -o screenshot -lclanCore -lclanApp -lclanDisplay

libs = -lclanApp -lclanCore -lclanDisplay -lclanPNG
cppflags = 

OBJF =	Intermediate/writepng.o \
		Intermediate/cl_writepng.o \
		Intermediate/screenshot.o

all: screenshot

screenshot:  $(OBJF)
	@echo "Building executable 'screenshot'..."
	$(CXX) $(libs) -o screenshot $(OBJF)

clean:
	@echo "Cleaning project"
	@find ./Intermediate -name '*.o' -exec rm "{}" \;
	@if [ -f ./screenshot ]; then rm -f ./screenshot; fi
	@if [ -f ./screenshot.png ]; then rm -f ./screenshot.png; fi

./Intermediate/%.o : %.cpp
	@echo "Compiling $<"
	-@if [ ! -d Intermediate ]; then mkdir Intermediate; fi
	$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) -O3 -Wall $< -o $@
