7e152c29fc
The code has been split into different source files. This breaks for now rotation for tiled images and PPM format. The focus is now on the PGM format.
31 lines
697 B
Makefile
31 lines
697 B
Makefile
CXX = clang++
|
|
CXXFLAGS = -std=c++11 -W -Wall -O3 -ffast-math -g -Werror
|
|
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)
|
|
|
|
debug: all
|
|
lldb $(BUILD_DIR)/rotation $(IMG)
|
|
|
|
cachegrind: all
|
|
valgrind --tool=cachegrind --dsymutil=yes $(BUILD_DIR)/rotation $(IMG)
|