30 lines
1.1 KiB
Makefile
30 lines
1.1 KiB
Makefile
IN_IMGS := imgs
|
|
OUT_IMGS := out-imgs
|
|
BIN := build/seam-carving --silent
|
|
|
|
images: images-ign images-birds
|
|
|
|
|
|
images-dir:
|
|
mkdir -p $(OUT_IMGS)
|
|
|
|
images-birds: build/seam-carving
|
|
$(BIN) -s $(IN_IMGS)/birds.jpg -m $(IN_IMGS)/birds-mask.jpg -o $(OUT_IMGS)/vertical-birds.jpg -u --vertical
|
|
$(BIN) -s $(IN_IMGS)/birds.jpg -m $(IN_IMGS)/birds-mask.jpg -o $(OUT_IMGS)/horizontal-birds.jpg -u
|
|
|
|
images-ign: build/seam-carving
|
|
$(BIN) -s $(IN_IMGS)/ign-circled.png -m $(IN_IMGS)/ign-mask.jpg -o $(OUT_IMGS)/ign-maxstep3-seams.jpg -u --max-step 3 --show-seams
|
|
$(BIN) -s $(IN_IMGS)/ign-circled.png -m $(IN_IMGS)/ign-mask.jpg -o $(OUT_IMGS)/ign-maxstep3.jpg -u --max-step 3
|
|
$(BIN) -s $(IN_IMGS)/ign-circled.png -m $(IN_IMGS)/ign-mask.jpg -o $(OUT_IMGS)/ign-maxstep15.jpg -u --max-step 15
|
|
|
|
images-boat: build/seam-carving
|
|
$(BIN) -s $(IN_IMGS)/boat.jpg -o $(OUT_IMGS)/boat-seams.jpg -n 350 --show-seams
|
|
$(BIN) -s $(IN_IMGS)/boat.jpg -o $(OUT_IMGS)/boat.jpg -n 350
|
|
|
|
build/seam-carving: src/seam-carving.cpp src/utils.cpp src/utils.hpp
|
|
mkdir -p build
|
|
cd build && cmake .. -DCMAKE_BUILD_TYPE=Release; make -j7
|
|
|
|
clean:
|
|
rm $(OUT_IMGS) -rf
|
|
rm build -rf
|