Skip to content
Newer
Older
100644 118 lines (91 sloc) 4.32 KB
977a259 @hejiann add Makefile
authored
1 # Copyright (C) 2012 hejian <hejian.he@gmail.com>
2 #
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 CC = gcc
17
18 GIMPTOOL = gimptool-2.0
19
20 GIMP_LIBS = `$(GIMPTOOL) --libs`
21 GIMP_CFLAGS = `$(GIMPTOOL) --cflags`
22
23 LIBS = $(GIMP_LIBS) -lm
24 CFLAGS = $(GIMP_CFLAGS)
25
26 GDK_PIXBUF_CSOURCE = gdk-pixbuf-csource
27
2ca2f02 @hejiann add the Simple Border plug-in.
authored
28 all: beautify skin-whitening simple-border border
977a259 @hejiann add Makefile
authored
29
2ca2f02 @hejiann add the Simple Border plug-in.
authored
30 install: beautify skin-whitening simple-border border
cc4074b @hejiann fix make install in x86_64.
authored
31 # need fix: --install-admin-bin has issue in x86_64,
32 # it install the plug-in into /usr/lib/gimp/2.0/plug-ins/
33 # but the correct directory is /usr/lib64/gimp/2.0/plug-ins/
3f1e1fa @hejiann provide make userinstall to install the plugin into user directory
authored
34 $(GIMPTOOL) --install-admin-bin beautify
35 $(GIMPTOOL) --install-admin-bin skin-whitening
2ca2f02 @hejiann add the Simple Border plug-in.
authored
36 $(GIMPTOOL) --install-admin-bin simple-border
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
37 $(GIMPTOOL) --install-admin-bin border
3f1e1fa @hejiann provide make userinstall to install the plugin into user directory
authored
38 ln -sf /usr/lib/gimp/2.0/plug-ins/beautify /usr/lib64/gimp/2.0/plug-ins/beautify
39 ln -sf /usr/lib/gimp/2.0/plug-ins/skin-whitening /usr/lib64/gimp/2.0/plug-ins/skin-whitening
2ca2f02 @hejiann add the Simple Border plug-in.
authored
40 ln -sf /usr/lib/gimp/2.0/plug-ins/simple-border /usr/lib64/gimp/2.0/plug-ins/simple-border
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
41 ln -sf /usr/lib/gimp/2.0/plug-ins/border /usr/lib64/gimp/2.0/plug-ins/border
3f1e1fa @hejiann provide make userinstall to install the plugin into user directory
authored
42
2604b3c @hejiann provide make uninstall and make useruninstall
authored
43 uninstall:
44 $(GIMPTOOL) --uninstall-admin-bin beautify
45 $(GIMPTOOL) --uninstall-admin-bin skin-whitening
2ca2f02 @hejiann add the Simple Border plug-in.
authored
46 $(GIMPTOOL) --uninstall-admin-bin simple-border
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
47 $(GIMPTOOL) --uninstall-admin-bin border
9d0e03a @hejiann add texture border plugin
authored
48 $(GIMPTOOL) --uninstall-admin-bin rip-border
49 $(GIMPTOOL) --uninstall-admin-bin texture-border
2604b3c @hejiann provide make uninstall and make useruninstall
authored
50 rm -f /usr/lib64/gimp/2.0/plug-ins/beautify
51 rm -f /usr/lib64/gimp/2.0/plug-ins/skin-whitening
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
52 rm -f /usr/lib64/gimp/2.0/plug-ins/border
2ca2f02 @hejiann add the Simple Border plug-in.
authored
53 rm -f /usr/lib64/gimp/2.0/plug-ins/simple-border
9d0e03a @hejiann add texture border plugin
authored
54 rm -f /usr/lib64/gimp/2.0/plug-ins/rip-border
55 rm -f /usr/lib64/gimp/2.0/plug-ins/texture-border
2604b3c @hejiann provide make uninstall and make useruninstall
authored
56
2ca2f02 @hejiann add the Simple Border plug-in.
authored
57 userinstall: beautify skin-whitening simple-border border
3f1e1fa @hejiann provide make userinstall to install the plugin into user directory
authored
58 $(GIMPTOOL) --install-bin beautify
59 $(GIMPTOOL) --install-bin skin-whitening
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
60 $(GIMPTOOL) --uninstall-bin rip-border
61 $(GIMPTOOL) --uninstall-bin texture-border
2ca2f02 @hejiann add the Simple Border plug-in.
authored
62 $(GIMPTOOL) --install-bin simple-border
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
63 $(GIMPTOOL) --install-bin border
cc4074b @hejiann fix make install in x86_64.
authored
64
9d0e03a @hejiann add texture border plugin
authored
65 useruninstall:
2604b3c @hejiann provide make uninstall and make useruninstall
authored
66 $(GIMPTOOL) --uninstall-bin beautify
67 $(GIMPTOOL) --uninstall-bin skin-whitening
2ca2f02 @hejiann add the Simple Border plug-in.
authored
68 $(GIMPTOOL) --uninstall-bin simple-border
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
69 $(GIMPTOOL) --uninstall-bin border
9d0e03a @hejiann add texture border plugin
authored
70 $(GIMPTOOL) --uninstall-bin rip-border
71 $(GIMPTOOL) --uninstall-bin texture-border
2604b3c @hejiann provide make uninstall and make useruninstall
authored
72
cc4074b @hejiann fix make install in x86_64.
authored
73 beautify: beautify.o beautify-effect.o
74 $(CC) -o $@ $^ $(LIBS)
977a259 @hejiann add Makefile
authored
75
cc4074b @hejiann fix make install in x86_64.
authored
76 beautify.o: beautify.c
977a259 @hejiann add Makefile
authored
77 $(CC) $(CFLAGS) -c beautify.c -o beautify.o
78
cc4074b @hejiann fix make install in x86_64.
authored
79 beautify-effect.o: beautify-effect.c beautify-textures.h
80 $(CC) $(CFLAGS) -c beautify-effect.c -o beautify-effect.o
81
977a259 @hejiann add Makefile
authored
82 beautify-textures.h: beautify-textures.list
83 $(GDK_PIXBUF_CSOURCE) --raw --build-list `cat beautify-textures.list` > $(@F)
84
76ee14d @hejiann skin-whitening: fix the plug-in-skin-whitening procedure to let this …
authored
85 skin-whitening: skin-whitening.o skin-whitening-effect.o
9d0e03a @hejiann add texture border plugin
authored
86 $(CC) -o $@ $^ $(LIBS)
87
88 skin-whitening.o: skin-whitening.c skin-whitening-images.h
89 $(CC) $(CFLAGS) -c skin-whitening.c -o skin-whitening.o
90
91 skin-whitening-images.h: skin-whitening-images.list
92 $(GDK_PIXBUF_CSOURCE) --raw --build-list `cat skin-whitening-images.list` > $(@F)
93
76ee14d @hejiann skin-whitening: fix the plug-in-skin-whitening procedure to let this …
authored
94 skin-whitening-effect.o: skin-whitening-effect.c skin-whitening-effect.h
95 $(CC) $(CFLAGS) -c skin-whitening-effect.c -o skin-whitening-effect.o
96
2ca2f02 @hejiann add the Simple Border plug-in.
authored
97 simple-border: simple-border.o
98 $(CC) -o $@ $^ $(LIBS)
99
6ac30bb @hejiann simple-border: fix border.
authored
100 simple-border.o: simple-border.c simple-border-textures.h
2ca2f02 @hejiann add the Simple Border plug-in.
authored
101 $(CC) $(CFLAGS) -c simple-border.c -o simple-border.o
102
6ac30bb @hejiann simple-border: fix border.
authored
103 simple-border-textures.h: simple-border-textures.list
104 $(GDK_PIXBUF_CSOURCE) --raw --build-list `cat simple-border-textures.list` > $(@F)
105
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
106 border: border.o
c32343d @hejiann add skin whitening tool
authored
107 $(CC) -o $@ $^ $(LIBS)
108
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
109 border.o: border.c border-textures.h
110 $(CC) $(CFLAGS) -c border.c -o border.o
c32343d @hejiann add skin whitening tool
authored
111
ef2b293 @hejiann Merge rip-border and texture-border into border.
authored
112 border-textures.h: border-textures.list
113 $(GDK_PIXBUF_CSOURCE) --raw --build-list `cat border-textures.list` > $(@F)
977a259 @hejiann add Makefile
authored
114
115 clean:
2ca2f02 @hejiann add the Simple Border plug-in.
authored
116 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
977a259 @hejiann add Makefile
authored
117
Something went wrong with that request. Please try again.