-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile
117 lines (91 loc) · 4.32 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# Copyright (C) 2012 hejian <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
CC = gcc
GIMPTOOL = gimptool-2.0
GIMP_LIBS = `$(GIMPTOOL) --libs`
GIMP_CFLAGS = `$(GIMPTOOL) --cflags`
LIBS = $(GIMP_LIBS) -lm
CFLAGS = $(GIMP_CFLAGS)
GDK_PIXBUF_CSOURCE = gdk-pixbuf-csource
all: beautify skin-whitening simple-border border
install: beautify skin-whitening simple-border border
# need fix: --install-admin-bin has issue in x86_64,
# it install the plug-in into /usr/lib/gimp/2.0/plug-ins/
# but the correct directory is /usr/lib64/gimp/2.0/plug-ins/
$(GIMPTOOL) --install-admin-bin beautify
$(GIMPTOOL) --install-admin-bin skin-whitening
$(GIMPTOOL) --install-admin-bin simple-border
$(GIMPTOOL) --install-admin-bin border
ln -sf /usr/lib/gimp/2.0/plug-ins/beautify /usr/lib64/gimp/2.0/plug-ins/beautify
ln -sf /usr/lib/gimp/2.0/plug-ins/skin-whitening /usr/lib64/gimp/2.0/plug-ins/skin-whitening
ln -sf /usr/lib/gimp/2.0/plug-ins/simple-border /usr/lib64/gimp/2.0/plug-ins/simple-border
ln -sf /usr/lib/gimp/2.0/plug-ins/border /usr/lib64/gimp/2.0/plug-ins/border
uninstall:
$(GIMPTOOL) --uninstall-admin-bin beautify
$(GIMPTOOL) --uninstall-admin-bin skin-whitening
$(GIMPTOOL) --uninstall-admin-bin simple-border
$(GIMPTOOL) --uninstall-admin-bin border
$(GIMPTOOL) --uninstall-admin-bin rip-border
$(GIMPTOOL) --uninstall-admin-bin texture-border
rm -f /usr/lib64/gimp/2.0/plug-ins/beautify
rm -f /usr/lib64/gimp/2.0/plug-ins/skin-whitening
rm -f /usr/lib64/gimp/2.0/plug-ins/border
rm -f /usr/lib64/gimp/2.0/plug-ins/simple-border
rm -f /usr/lib64/gimp/2.0/plug-ins/rip-border
rm -f /usr/lib64/gimp/2.0/plug-ins/texture-border
userinstall: beautify skin-whitening simple-border border
$(GIMPTOOL) --install-bin beautify
$(GIMPTOOL) --install-bin skin-whitening
$(GIMPTOOL) --uninstall-bin rip-border
$(GIMPTOOL) --uninstall-bin texture-border
$(GIMPTOOL) --install-bin simple-border
$(GIMPTOOL) --install-bin border
useruninstall:
$(GIMPTOOL) --uninstall-bin beautify
$(GIMPTOOL) --uninstall-bin skin-whitening
$(GIMPTOOL) --uninstall-bin simple-border
$(GIMPTOOL) --uninstall-bin border
$(GIMPTOOL) --uninstall-bin rip-border
$(GIMPTOOL) --uninstall-bin texture-border
beautify: beautify.o beautify-effect.o
$(CC) -o $@ $^ $(LIBS)
beautify.o: beautify.c
$(CC) $(CFLAGS) -c beautify.c -o beautify.o
beautify-effect.o: beautify-effect.c beautify-textures.h
$(CC) $(CFLAGS) -c beautify-effect.c -o beautify-effect.o
beautify-textures.h: beautify-textures.list
$(GDK_PIXBUF_CSOURCE) --raw --build-list `cat beautify-textures.list` > $(@F)
skin-whitening: skin-whitening.o skin-whitening-effect.o
$(CC) -o $@ $^ $(LIBS)
skin-whitening.o: skin-whitening.c skin-whitening-images.h
$(CC) $(CFLAGS) -c skin-whitening.c -o skin-whitening.o
skin-whitening-images.h: skin-whitening-images.list
$(GDK_PIXBUF_CSOURCE) --raw --build-list `cat skin-whitening-images.list` > $(@F)
skin-whitening-effect.o: skin-whitening-effect.c skin-whitening-effect.h
$(CC) $(CFLAGS) -c skin-whitening-effect.c -o skin-whitening-effect.o
simple-border: simple-border.o
$(CC) -o $@ $^ $(LIBS)
simple-border.o: simple-border.c simple-border-textures.h
$(CC) $(CFLAGS) -c simple-border.c -o simple-border.o
simple-border-textures.h: simple-border-textures.list
$(GDK_PIXBUF_CSOURCE) --raw --build-list `cat simple-border-textures.list` > $(@F)
border: border.o
$(CC) -o $@ $^ $(LIBS)
border.o: border.c border-textures.h
$(CC) $(CFLAGS) -c border.c -o border.o
border-textures.h: border-textures.list
$(GDK_PIXBUF_CSOURCE) --raw --build-list `cat border-textures.list` > $(@F)
clean:
rm -f *.o beautify beautify-textures.h skin-whitening skin-whitening-images.h simple-border border border-textures.h rip-border rip-border-textures.h texture-border texture-border-textures.h