OSDN Git Service

LinGui: consolidate all resources into one stringified plist file that gets
[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
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         main.c \
90         settings.c \
91         settings.h \
92         resources.c \
93         resources.h \
94         presets.c \
95         presets.h \
96         icons.c \
97         icons.h \
98         icon_tools.c \
99         icon_tools.h \
100         values.c \
101         values.h \
102         plist.c \
103         plist.h \
104         hb-backend.c \
105         hb-backend.h \
106         renderer_button.h \
107         renderer_button.c \
108         ghbcellrenderertext.c \
109         ghbcellrenderertext.h \
110         ghb-dvd.c \
111         ghb-dvd.h \
112         marshalers.c \
113         marshalers.h
114
115 ghb_LDFLAGS = \
116         -Wl,--export-dynamic
117
118 ghb_LDADD = $(GHB_LIBS) $(HB_LIBS)
119
120 ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
121
122 makewidgetdeps_SOURCES = \
123         plist.c \
124         plist.h \
125         values.c \
126         values.h \
127         makedeps.c 
128
129 makewidgetdeps_LDADD = $(GHBTOOLS_LIBS)
130
131 create_resources_SOURCES = \
132         create_resources.c \
133         plist.c \
134         plist.h \
135         values.c \
136         values.h \
137         icon_tools.c \
138         icon_tools.h
139
140 create_resources_LDADD = $(GHBTOOLS_LIBS)
141
142 quotestring_SOURCES = preset_to_string.c
143
144 callbacks.c: widget_deps.h widget_reverse_deps.h
145
146 widget_deps.h: makewidgetdeps quotestring
147         ./makewidgetdeps
148         ./quotestring widget_deps widget_deps.h
149
150 widget_reverse_deps.h: makewidgetdeps quotestring
151         ./makewidgetdeps
152         ./quotestring widget_reverse_deps widget_reverse_deps.h
153
154 resources.c: resource_data.h
155
156 resource_data.h: quotestring resources.plist
157         ./quotestring resources.plist resource_data.h
158
159 resources.plist: create_resources resources.list $(icons_dep) internal_defaults.xml standard_presets.xml
160         ./create_resources resources.list resources.plist
161
162 ghbcellrenderertext.c: marshalers.h
163
164 marshalers.h: marshalers.list
165         glib-genmarshal --prefix=ghb_marshal marshalers.list --header > marshalers.h
166
167 marshalers.c: marshalers.list
168         glib-genmarshal --prefix=ghb_marshal marshalers.list --body > marshalers.c
169
170 EXTRA_DIST = HandBrakeCLI
171
172 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
173
174 uninstall-local:
175         for icon in $(icons); do \
176                 SIZE=`echo $$icon | cut -d. -f2`; \
177                 FILE=`echo $$icon | cut -d. -f1,3`; \
178                 if [ "$$SIZE" = "svg" ]; then \
179                         SIZE="scalable"; \
180                         FILE="$$FILE.svg"; \
181                 else \
182                         SIZE="$${SIZE}x$${SIZE}"; \
183                 fi; \
184                 rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
185         done
186         @-if test -n "$(DESTDIR)/$(datadir)"; then \
187                 echo "Updating Gtk icon cache."; \
188                 $(gtk_update_icon_cache); \
189         else \
190                 echo "*** Icon cache not updated. After install, run this:"; \
191                 echo "***   $(gtk_update_icon_cache)"; \
192         fi
193         rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu)
194
195 install-exec-local:
196         $(INSTALL_PROGRAM) $(srcdir)/HandBrakeCLI $(DESTDIR)/$(bindir)/HandBrakeCLI
197
198 install-data-local:
199         for icon in $(icons); do \
200                 SIZE=`echo $$icon | cut -d. -f2`; \
201                 FILE=`echo $$icon | cut -d. -f1,3`; \
202                 if [ "$$SIZE" = "svg" ]; then \
203                         SIZE="scalable"; \
204                         FILE="$$FILE.svg"; \
205                 else \
206                         SIZE="$${SIZE}x$${SIZE}"; \
207                 fi; \
208                 mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
209                 $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
210         done
211         @-if test -n "$(DESTDIR)/$(datadir)"; then \
212                 echo "Updating Gtk icon cache."; \
213                 $(gtk_update_icon_cache); \
214         else \
215                 echo "*** Icon cache not updated. After install, run this:"; \
216                 echo "***   $(gtk_update_icon_cache)"; \
217         fi
218         mkdir -p $(DESTDIR)/$(datadir)/applications/; \
219         $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)