You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

39 lines
950 B

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
all: $(OBJS)
$(CXX) $(CXXFLAGS) $(LFLAGS) $(OBJS) -o $(BUILD_DIR)/rotation
%.o: %.cpp $(HEADERS)
$(CXX) $(CXXFLAGS) $(DEFINES) $< -c -o $@
clean:
@rm -f rotation *~ *.o .*.swp *.ppm *.pgm *.pnm cachegrind.out.* callgrind.out.*
run: all
@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)