rotate-me-fast/Makefile
Fabien Freling 4dba86c9f0 Add configure script.
- Deactivate LTO.
- Deactivate SIMD.
2014-07-27 18:01:41 +02:00

40 lines
936 B
Makefile

include Makefile.rules
CXXFLAGS = -std=c++11 -W -Wall -O3 -ffast-math -g $(CXXFLAGS_PLAFORM)
LFLAGS = #-flto
DEFINES = #-DSIMD
BUILD_DIR = /tmp
SRC = rotation.cpp \
image.cpp \
pnm.cpp
HEADERS = image.h \
pnm.h
OBJS = $(patsubst %.cpp,%.o,$(SRC))
IMG = img/lena_3000.pgm
all: $(OBJS)
$(CXX) $(CXXFLAGS) $(DEFINES) $(LFLAGS) $(OBJS) -o $(BUILD_DIR)/rotation
%.o: %.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) $(DEFINES) $< -c -o $@
clean:
@rm -f *~ *.o .*.swp *.ppm *.pgm *.pnm cachegrind.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)