-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (25 loc) · 787 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FLAGS = -Wall -std=gnu99 -g
all: copy greyscale gaussian_blur edge scale image_filter
copy: copy.o bitmap.o
gcc ${FLAGS} -o $@ $^ -lm
greyscale: greyscale.o bitmap.o
gcc ${FLAGS} -o $@ $^ -lm
gaussian_blur: gaussian_blur.o bitmap.o
gcc ${FLAGS} -o $@ $^ -lm
edge: edge.o bitmap.o
gcc ${FLAGS} -o $@ $^ -lm
scale: scale.o bitmap.o
gcc ${FLAGS} -o $@ $^ -lm
image_filter: image_filter.o
gcc ${FLAGS} -o $@ $^ -lm
%.o: %.c bitmap.h
gcc ${FLAGS} -c $<
clean:
rm *.o image_filter copy greyscale gaussian_blur edge scale
test:
mkdir images -p
./copy < dog.bmp > images/dog_copy.bmp
./greyscale < dog.bmp > images/dog_greyscale.bmp
./gaussian_blur < dog.bmp > images/dog_gaussian_blur.bmp
./edge < dog.bmp > images/dog_edge.bmp
./scale < dog.bmp > images/dog_scale.bmp