OSDN Git Service

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