OSDN Git Service

LinGui: force use of contrib libs. libtool seems to be pretty arbitrary
[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-activity.32.png \
35         hb-add-queue.32.png \
36         hb-canceled.16.png \
37         hb-complete.16.png \
38         hb-drawer.32.png \
39         hb-icon.128.png \
40         hb-icon.64.png \
41         hb-pause.32.png \
42         hb-play.32.png \
43         hb-queue.32.png \
44         hb-queue-delete.16.png \
45         hb-queue-job.16.png \
46         hb-queue-pass1.16.png \
47         hb-queue-pass2.16.png \
48         hb-queue-subtitle.16.png \
49         hb-remove.32.png \
50         hb-source.32.png \
51         hb-stop.32.png \
52         hb-working0.16.png \
53         hb-working1.16.png \
54         hb-working2.16.png \
55         hb-working3.16.png \
56         hb-working4.16.png \
57         hb-working5.16.png 
58
59 hb_data = standard_presets
60 hb_menu = ghb.desktop
61
62 builderdir = $(datadir)/ghb/builder
63 builder_DATA = ghb.ui
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 BUILT_SOURCES = HandBrakeCLI
77
78 HandBrakeCLI: $(HB_DIR)/HandBrakeCLI
79         /bin/cp $< $@
80
81 # Dummy file, not built.  Forces g++ linking
82 nodist_EXTRA_ghb_SOURCES = dummy.cpp
83
84 ghb_SOURCES = \
85         callbacks.c \
86         callbacks.h \
87         main.c \
88         settings.c \
89         settings.h \
90         hb-backend.c \
91         hb-backend.h \
92         renderer_button.h \
93         renderer_button.c \
94         ghb-dvd.c \
95         ghb-dvd.h 
96
97 ghb_LDFLAGS = \
98         -Wl,--export-dynamic
99
100 ghb_LDADD = $(GHB_LIBS) $(HB_LIBS)
101
102 ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
103
104 EXTRA_DIST = $(builder_DATA) $(icons) HandBrakeCLI
105
106 uninstall-local:
107         for icon in $(icons); do \
108                 SIZE=`echo $$icon | cut -d. -f2`; \
109                 FILE=`echo $$icon | cut -d. -f1,3`; \
110                 if [ "$$SIZE" = "svg" ]; then \
111                         SIZE="scalable"; \
112                         FILE="$$FILE.svg"; \
113                 else \
114                         SIZE="$${SIZE}x$${SIZE}"; \
115                 fi; \
116                 rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
117         done
118         for file in $(hb_data); do \
119                 rm -f $(DESTDIR)/$(datadir)/ghb/$$file; \
120         done
121         rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu)
122
123 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
124
125 install-exec-local:
126         $(INSTALL_PROGRAM) $(srcdir)/HandBrakeCLI $(DESTDIR)/$(bindir)/HandBrakeCLI
127
128 install-data-local:
129         for icon in $(icons); do \
130                 SIZE=`echo $$icon | cut -d. -f2`; \
131                 FILE=`echo $$icon | cut -d. -f1,3`; \
132                 if [ "$$SIZE" = "svg" ]; then \
133                         SIZE="scalable"; \
134                         FILE="$$FILE.svg"; \
135                 else \
136                         SIZE="$${SIZE}x$${SIZE}"; \
137                 fi; \
138                 mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
139                 $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
140         done
141         for file in $(hb_data); do \
142                 mkdir -p $(DESTDIR)/$(datadir)/ghb/; \
143                 $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)/$(datadir)/ghb/$$file; \
144         done
145         @-if test -n "$(DESTDIR)/$(datadir)"; then \
146                 echo "Updating Gtk icon cache."; \
147                 $(gtk_update_icon_cache); \
148         else \
149                 echo "*** Icon cache not updated. After install, run this:"; \
150                 echo "***   $(gtk_update_icon_cache)"; \
151         fi
152         mkdir -p $(DESTDIR)/$(datadir)/applications/; \
153         $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)