Introduction to 2D Linux Game Programming/Algorithms/Simple Software Transformations/The Makefile

The Makefile

edit

The Source:

edit
#Makefile
CXX = g++ `sdl-config --cflags`
CCFLAGS = -g -Wall -lSDL_image

all: IntegerScaleNonOptimized IntegerScale Rotate90 Flip

IntegerScaleNonOptimized : S.o IntegerScaleNonOptimized.o
	${CXX} ${CCFLAGS} -o IntegerScaleNonOptimized IntegerScaleNonOptimized.o S.o

IntegerScaleNonOptimized.o : IntegerScaleNonOptimized.cpp S.o
	${CXX} ${CCFLAGS} -c IntegerScaleNonOptimized.cpp

IntegerScale : IntegerScale.o S.o
	${CXX} ${CCFLAGS} -o IntegerScale IntegerScale.o S.o

IntegerScale.o : IntegerScale.cpp S.o
	${CXX} ${CCFLAGS} -c IntegerScale.cpp

Rotate90 : Rotate90.o S.o
	${CXX} ${CCFLAGS} -o Rotate90 Rotate90.o S.o

Rotate90.o : Rotate90.cpp S.o
	${CXX} ${CCFLAGS} -c Rotate90.cpp

Flip : Flip.o S.o
	${CXX} ${CCFLAGS} -o Flip Flip.o S.o

Flip.o : Flip.cpp S.o
	${CXX} ${CCFLAGS} -c Flip.cpp

S.o : S.cpp include/S.h
	${CXX} ${CCFLAGS} -c S.cpp
clean : 
	rm -f *.o IntegerScale Rotate90 IntegerScaleNonOptimized Flip

allclean :
	make clean
	make IntegerScaleNonOptimized
	make IntegerScale
	make Rotate90
	make Flip