2014-07-27 18:01:41 +02:00
|
|
|
include Makefile.rules
|
|
|
|
|
2014-07-28 19:47:51 +02:00
|
|
|
CXXFLAGS = -std=c++11 -W -Wall -O3 -ffast-math -g $(CXXFLAGS_PLATFORM)
|
2014-07-27 18:01:41 +02:00
|
|
|
DEFINES = #-DSIMD
|
2014-07-27 22:40:03 +02:00
|
|
|
BUILD_DIR = .
|
2014-07-20 16:34:45 +02:00
|
|
|
SRC = rotation.cpp \
|
|
|
|
image.cpp \
|
|
|
|
pnm.cpp
|
|
|
|
HEADERS = image.h \
|
|
|
|
pnm.h
|
|
|
|
OBJS = $(patsubst %.cpp,%.o,$(SRC))
|
|
|
|
IMG = img/lena_3000.pgm
|
2014-06-18 08:47:10 +02:00
|
|
|
|
2014-07-20 16:34:45 +02:00
|
|
|
all: $(OBJS)
|
2014-07-28 19:47:51 +02:00
|
|
|
$(CXX) $(CXXFLAGS) $(LFLAGS) $(OBJS) -o $(BUILD_DIR)/rotation
|
2014-07-20 16:34:45 +02:00
|
|
|
|
|
|
|
%.o: %.cpp $(HEADERS)
|
|
|
|
$(CXX) $(CXXFLAGS) $(DEFINES) $< -c -o $@
|
2014-06-18 08:47:10 +02:00
|
|
|
|
|
|
|
clean:
|
2014-07-27 22:40:03 +02:00
|
|
|
@rm -f rotation *~ *.o .*.swp *.ppm *.pgm *.pnm cachegrind.out.* callgrind.out.*
|
2014-07-08 00:15:16 +02:00
|
|
|
|
|
|
|
run: all
|
2014-07-10 19:40:51 +02:00
|
|
|
$(BUILD_DIR)/rotation $(IMG)
|
2014-07-08 00:15:16 +02:00
|
|
|
|
2014-07-24 22:17:55 +02:00
|
|
|
runall: all
|
|
|
|
$(BUILD_DIR)/rotation img/lena_512.pgm
|
|
|
|
$(BUILD_DIR)/rotation img/lena_1024.pgm
|
|
|
|
$(BUILD_DIR)/rotation img/lena_3000.pgm
|
|
|
|
|
2014-07-12 22:37:15 +02:00
|
|
|
debug: all
|
|
|
|
lldb $(BUILD_DIR)/rotation $(IMG)
|
|
|
|
|
2014-07-08 00:15:16 +02:00
|
|
|
cachegrind: all
|
2014-07-20 16:34:45 +02:00
|
|
|
valgrind --tool=cachegrind --dsymutil=yes $(BUILD_DIR)/rotation $(IMG)
|
2014-07-24 22:40:02 +02:00
|
|
|
|
|
|
|
callgrind: all
|
|
|
|
valgrind --tool=callgrind --dsymutil=yes $(BUILD_DIR)/rotation $(IMG)
|