OSDN Git Service

LinGui: merge gtk mingw cross compiling support
[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 -lavutil -ldca -ldvdread \
6         -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
7         -lx264 -lxvidcore -lmp4v2 -lswscale -ltheora -lfaad -lz \
8         -lbz2 -liberty -lpthreadGC2
9 else
10 HB_LIBS= \
11         -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdread \
12         -lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
13         -lx264 -lxvidcore -lmp4v2 -lswscale -ltheora -lfaad -lz \
14         -lbz2 -liberty -lpthread
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         x264handler.c \
72         x264handler.h \
73         main.c \
74         settings.c \
75         settings.h \
76         resources.c \
77         resources.h \
78         presets.c \
79         presets.h \
80         preview.c \
81         icons.c \
82         icons.h \
83         icon_tools.c \
84         icon_tools.h \
85         values.c \
86         values.h \
87         appcast.c \
88         appcast.h \
89         plist.c \
90         plist.h \
91         hb-backend.c \
92         hb-backend.h \
93         renderer_button.h \
94         renderer_button.c \
95         ghbcellrenderertext.c \
96         ghbcellrenderertext.h \
97     ghbcompositor.c \
98     ghbcompositor.h \
99         ghb-dvd.c \
100         ghb-dvd.h \
101         marshalers.c \
102         marshalers.h
103
104 if MINGW
105 ghb_LDFLAGS = \
106         -mwindows -Wl,--export-dynamic -Wl,--exclude-libs,ALL
107 else
108 ghb_LDFLAGS = \
109         -Wl,--export-dynamic -Wl,--exclude-libs,ALL
110 endif
111
112 ghb_LDADD = $(HB_LIBS) $(GHB_LIBS)
113
114 ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
115
116 resources.o: resource_data.h
117
118 resource_data.h: quotestring resources.plist
119         ./quotestring resources.plist resource_data.h
120
121 widget_reverse.deps: widgetdeps
122 widget.deps: widgetdeps
123         ./widgetdeps
124
125 resources.plist: create_resources resources.list $(icons_dep) internal_defaults.xml standard_presets.xml ghb.ui widget.deps widget_reverse.deps
126         ./create_resources -I$(srcdir) $(srcdir)/resources.list resources.plist
127
128 ghbcellrenderertext.c: marshalers.h
129
130 marshalers.h: marshalers.list
131         glib-genmarshal --prefix=ghb_marshal marshalers.list --header > marshalers.h
132
133 marshalers.c: marshalers.list
134         glib-genmarshal --prefix=ghb_marshal marshalers.list --body > marshalers.c
135
136 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
137
138 uninstall-local:
139         for icon in $(icons); do \
140                 SIZE=`echo $$icon | cut -d. -f2`; \
141                 FILE=`echo $$icon | cut -d. -f1,3`; \
142                 if [ "$$SIZE" = "svg" ]; then \
143                         SIZE="scalable"; \
144                         FILE="$$FILE.svg"; \
145                 else \
146                         SIZE="$${SIZE}x$${SIZE}"; \
147                 fi; \
148                 rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
149         done
150         @-if test -n "$(DESTDIR)/$(datadir)"; then \
151                 echo "Updating Gtk icon cache."; \
152                 $(gtk_update_icon_cache); \
153         else \
154                 echo "*** Icon cache not updated. After install, run this:"; \
155                 echo "***   $(gtk_update_icon_cache)"; \
156         fi
157         rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu)
158
159 install-data-local:
160         for icon in $(icons); do \
161                 SIZE=`echo $$icon | cut -d. -f2`; \
162                 FILE=`echo $$icon | cut -d. -f1,3`; \
163                 if [ "$$SIZE" = "svg" ]; then \
164                         SIZE="scalable"; \
165                         FILE="$$FILE.svg"; \
166                 else \
167                         SIZE="$${SIZE}x$${SIZE}"; \
168                 fi; \
169                 mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
170                 $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
171         done
172         @-if test -n "$(DESTDIR)/$(datadir)"; then \
173                 echo "Updating Gtk icon cache."; \
174                 $(gtk_update_icon_cache); \
175         else \
176                 echo "*** Icon cache not updated. After install, run this:"; \
177                 echo "***   $(gtk_update_icon_cache)"; \
178         fi
179         mkdir -p $(DESTDIR)/$(datadir)/applications/; \
180         $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)