File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11images_names =kodim01.png kodim02.png
22
3- all : split
4- images :$(addprefix testImage/,$(images_names ) )
5- .PHONY : clean test
6-
7- BINS =split tests/createBlankImage
3+ PREFIX ?= /usr/local
4+ PROG =split
5+ BINS =${PROG} tests/createBlankImage
86OBJ: =split.o lib/fillwithblack.o lib/manppm.o
97EXTRACFLAGS =
108CFLAGS =-Wall $(EXTRACFLAGS )
119
10+ all : ${PROG}
11+ images :$(addprefix testImage/,$(images_names ) )
12+ .PHONY : clean test
13+
1214$(BINS ) :
1315 $(CC ) $(CFLAGS ) -lm -o $@ $^
1416
15- split : $(OBJ )
17+ ${PROG} : $(OBJ )
1618tests/createBlankImage : tests/createBlankImage.o lib/fillwithblack.o lib/manppm.o
1719
1820
1921testImage/kodim% .png :
2022 wget --quiet http://r0k.us/graphics/kodak/kodak/$(notdir $@ ) -O $@
2123
2224clean :
23- rm -f $(OBJ ) split tests/createBlankImage
24-
25+ rm -f $(OBJ ) ${PROG} tests/createBlankImage
2526
26-
27- test : tests/cuttest tests/createBlankImage split
27+ test : tests/cuttest tests/createBlankImage ${PROG}
2828 cd $(dir $< ) && bash $(notdir $< )
29+
30+ install :
31+ @install -Dm755 ${PROG} ${DESTDIR} /${PREFIX} /bin/${PROG}
You can’t perform that action at this time.
0 commit comments