OSDN Git Service

LinGui: add update checking. shows a dialog similar to the macui when
[handbrake-jp/handbrake-jp-git.git] / gtk / src / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 ## Created by Anjuta
4
5 #HB_LIBS=$(HB_DIR)/libhb/libhb.a -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdread -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate -lx264 -lxvidcore -lmp4v2 -lswscale -ltheora -lfaad -lz -lbz2 -lpthread
6
7 HB_LIBS=\
8         $(HB_DIR)/libhb/libhb.a \
9         $(HB_DIR)/contrib/lib/liba52.a \
10         $(HB_DIR)/contrib/lib/libmkv.a \
11         $(HB_DIR)/contrib/lib/libavformat.a \
12         $(HB_DIR)/contrib/lib/libavcodec.a \
13         $(HB_DIR)/contrib/lib/libavutil.a \
14         $(HB_DIR)/contrib/lib/libdca.a \
15         $(HB_DIR)/contrib/lib/libdvdread.a \
16         $(HB_DIR)/contrib/lib/libfaac.a \
17         $(HB_DIR)/contrib/lib/libmp3lame.a \
18         $(HB_DIR)/contrib/lib/libmpeg2.a \
19         $(HB_DIR)/contrib/lib/libvorbis.a \
20         $(HB_DIR)/contrib/lib/libvorbisenc.a \
21         $(HB_DIR)/contrib/lib/libogg.a \
22         $(HB_DIR)/contrib/lib/libsamplerate.a \
23         $(HB_DIR)/contrib/lib/libx264.a \
24         $(HB_DIR)/contrib/lib/libxvidcore.a \
25         $(HB_DIR)/contrib/lib/libmp4v2.a \
26         $(HB_DIR)/contrib/lib/libswscale.a \
27         $(HB_DIR)/contrib/lib/libtheora.a \
28         $(HB_DIR)/contrib/lib/libfaad.a \
29         -lz \
30         -lbz2 \
31         -lpthread
32
33 icons = \
34         hb-icon.128.png 
35
36 icons_dep =     \
37         hb-activity.32.png \
38         hb-add-queue.32.png \
39         hb-canceled.16.png \
40         hb-complete.16.png \
41         hb-drawer.32.png \
42         hb-icon.128.png \
43         hb-icon.64.png \
44         hb-pause.32.png \
45         hb-play.32.png \
46         hb-pref.32.png \
47         hb-queue.32.png \
48         hb-queue-delete.16.png \
49         hb-queue-job.16.png \
50         hb-queue-pass1.16.png \
51         hb-queue-pass2.16.png \
52         hb-queue-subtitle.16.png \
53         hb-remove.32.png \
54         hb-source.32.png \
55         hb-stop.32.png \
56         hb-working0.16.png \
57         hb-working1.16.png \
58         hb-working2.16.png \
59         hb-working3.16.png \
60         hb-working4.16.png \
61         hb-working5.16.png
62
63 hb_menu = ghb.desktop
64
65 AM_CPPFLAGS = \
66         -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
67         -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
68         -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
69         $(GHB_CFLAGS)
70
71 AM_CFLAGS =\
72          -Wall\
73          -g
74
75 bin_PROGRAMS = ghb 
76 noinst_PROGRAMS = makewidgetdeps quotestring create_resources preset_xlat
77
78 BUILT_SOURCES = HandBrakeCLI
79
80 HandBrakeCLI: $(HB_DIR)/HandBrakeCLI
81         /bin/cp $< $@
82
83 # Dummy file, not built.  Forces g++ linking
84 nodist_EXTRA_ghb_SOURCES = dummy.cpp
85
86 ghb_SOURCES = \
87         callbacks.c \
88         callbacks.h \
89         queuehandler.c \
90         queuehandler.h \
91         audiohandler.c \
92         audiohandler.h \
93         x264handler.c \
94         x264handler.h \
95         main.c \
96         settings.c \
97         settings.h \
98         resources.c \
99         resources.h \
100         presets.c \
101         presets.h \
102         icons.c \
103         icons.h \
104         icon_tools.c \
105         icon_tools.h \
106         values.c \
107         values.h \
108         appcast.c \
109         appcast.h \
110         plist.c \
111         plist.h \
112         hb-backend.c \
113         hb-backend.h \
114         renderer_button.h \
115         renderer_button.c \
116         ghbcellrenderertext.c \
117         ghbcellrenderertext.h \
118         ghb-dvd.c \
119         ghb-dvd.h \
120         marshalers.c \
121         marshalers.h
122
123 ghb_LDFLAGS = \
124         -Wl,--export-dynamic
125
126 ghb_LDADD = $(GHB_LIBS) $(HB_LIBS)
127
128 ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
129
130 makewidgetdeps_SOURCES = \
131         plist.c \
132         plist.h \
133         values.c \
134         values.h \
135         makedeps.c 
136
137 makewidgetdeps_LDADD = $(GHBTOOLS_LIBS)
138
139 create_resources_SOURCES = \
140         create_resources.c \
141         plist.c \
142         plist.h \
143         values.c \
144         values.h \
145         icon_tools.c \
146         icon_tools.h
147
148 create_resources_LDADD = $(GHBTOOLS_LIBS)
149
150 preset_xlat_SOURCES = \
151         preset_xlat.c \
152         plist.c \
153         plist.h \
154         values.c \
155         values.h
156
157 preset_xlat_LDADD = $(GHBTOOLS_LIBS)
158
159 quotestring_SOURCES = quotestring.c
160
161 dumbell: preset_xlat
162
163 resources.c: resource_data.h
164
165 resource_data.h: quotestring resources.plist
166         ./quotestring resources.plist resource_data.h
167
168 widget_deps: makewidgetdeps
169         ./makewidgetdeps
170
171 resources.plist: create_resources resources.list $(icons_dep) internal_defaults.xml standard_presets.xml ghb.ui widget_deps widget_reverse_deps
172         ./create_resources resources.list resources.plist
173
174 ghbcellrenderertext.c: marshalers.h
175
176 marshalers.h: marshalers.list
177         glib-genmarshal --prefix=ghb_marshal marshalers.list --header > marshalers.h
178
179 marshalers.c: marshalers.list
180         glib-genmarshal --prefix=ghb_marshal marshalers.list --body > marshalers.c
181
182 EXTRA_DIST = HandBrakeCLI
183
184 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
185
186 uninstall-local:
187         for icon in $(icons); do \
188                 SIZE=`echo $$icon | cut -d. -f2`; \
189                 FILE=`echo $$icon | cut -d. -f1,3`; \
190                 if [ "$$SIZE" = "svg" ]; then \
191                         SIZE="scalable"; \
192                         FILE="$$FILE.svg"; \
193                 else \
194                         SIZE="$${SIZE}x$${SIZE}"; \
195                 fi; \
196                 rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
197         done
198         @-if test -n "$(DESTDIR)/$(datadir)"; then \
199                 echo "Updating Gtk icon cache."; \
200                 $(gtk_update_icon_cache); \
201         else \
202                 echo "*** Icon cache not updated. After install, run this:"; \
203                 echo "***   $(gtk_update_icon_cache)"; \
204         fi
205         rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu)
206
207 install-exec-local:
208         $(INSTALL_PROGRAM) $(srcdir)/HandBrakeCLI $(DESTDIR)/$(bindir)/HandBrakeCLI
209
210 install-data-local:
211         for icon in $(icons); do \
212                 SIZE=`echo $$icon | cut -d. -f2`; \
213                 FILE=`echo $$icon | cut -d. -f1,3`; \
214                 if [ "$$SIZE" = "svg" ]; then \
215                         SIZE="scalable"; \
216                         FILE="$$FILE.svg"; \
217                 else \
218                         SIZE="$${SIZE}x$${SIZE}"; \
219                 fi; \
220                 mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
221                 $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
222         done
223         @-if test -n "$(DESTDIR)/$(datadir)"; then \
224                 echo "Updating Gtk icon cache."; \
225                 $(gtk_update_icon_cache); \
226         else \
227                 echo "*** Icon cache not updated. After install, run this:"; \
228                 echo "***   $(gtk_update_icon_cache)"; \
229         fi
230         mkdir -p $(DESTDIR)/$(datadir)/applications/; \
231         $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)