OSDN Git Service

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