blob: a092562fecca011c77e2d076042fadcdef677fc3 (
plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
MAIN = plugin-img
GIMPTOOL = gimptool-2.0
CC = gcc
LD = gcc
CFLAGS = $(shell $(GIMPTOOL) --cflags) \
-O2 -Wall -Wextra -Wno-attributes \
-Wno-unused-parameter
LIBS = $(shell $(GIMPTOOL) --libs)
SRC = $(wildcard *.c)
HDR = $(wildcard *.h)
OBJ = $(subst .c,.o,$(SRC))
build: $(MAIN)
help:
@echo "MAKE targets:"
@echo ""
@echo "build - build plugin"
@echo "install - install plugin"
@echo ""
@echo "indent - beatify sources"
@echo "clean - remove build garbage"
@echo ""
@echo "test - run gimp with samples"
@echo "test-fu - run non-interactively gimp for batch file recoding"
install: $(MAIN)
$(GIMPTOOL) --install-bin $(MAIN)
indent: $(SRC) $(HDR)
indent $(INDENT_OPT) $?
clean:
rm -f *.o *.i *.s $(MAIN)
$(MAIN): $(OBJ)
$(LD) $(OBJ) $(LIBS) -o $@
%.o: %.c $(HDR) Makefile
$(CC) -c $(CFLAGS) $< -o $@
test: install
gimp samples/*.img
test-fu: install img-fu
gimp -i -b - < img-fu
.PHONY: install build test test-fu indent clean
|