rotate-me-fast/Makefile

40 lines
951 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))
2014-08-06 23:22:29 +02:00
IMG = img/lena_1024.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
2014-08-06 21:43:27 +02:00
@rm -f rotated_*.pnm
$(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)