rotate-me-fast/Makefile

39 lines
929 B
Makefile
Raw Normal View History

include Makefile.rules
CXXFLAGS = -std=c++11 -W -Wall -O3 -ffast-math -g $(CXXFLAGS_PLATFORM)
DEFINES = #-DSIMD
BUILD_DIR = .
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
all: $(OBJS)
$(CXX) $(CXXFLAGS) $(LFLAGS) $(OBJS) -o $(BUILD_DIR)/rotation
%.o: %.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) $(DEFINES) $< -c -o $@
2014-06-18 08:47:10 +02:00
clean:
@rm -f rotation *~ *.o .*.swp *.ppm *.pgm *.pnm cachegrind.out.* callgrind.out.*
run: all
$(BUILD_DIR)/rotation $(IMG)
runall: all
$(BUILD_DIR)/rotation img/lena_512.pgm
$(BUILD_DIR)/rotation img/lena_1024.pgm
$(BUILD_DIR)/rotation img/lena_3000.pgm
debug: all
lldb $(BUILD_DIR)/rotation $(IMG)
cachegrind: all
valgrind --tool=cachegrind --dsymutil=yes $(BUILD_DIR)/rotation $(IMG)
callgrind: all
valgrind --tool=callgrind --dsymutil=yes $(BUILD_DIR)/rotation $(IMG)