OSDN Git Service

LinGui: fix problem with install target of make
[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 icons = \
8         hb-activity.32.png \
9         hb-add-queue.32.png \
10         hb-canceled.16.png \
11         hb-complete.16.png \
12         hb-drawer.32.png \
13         hb-icon.128.png \
14         hb-icon.64.png \
15         hb-pause.32.png \
16         hb-play.32.png \
17         hb-queue.32.png \
18         hb-queue-delete.16.png \
19         hb-queue-job.16.png \
20         hb-queue-pass1.16.png \
21         hb-queue-pass2.16.png \
22         hb-queue-subtitle.16.png \
23         hb-remove.32.png \
24         hb-source.32.png \
25         hb-stop.32.png \
26         hb-working0.16.png \
27         hb-working1.16.png \
28         hb-working2.16.png \
29         hb-working3.16.png \
30         hb-working4.16.png \
31         hb-working5.16.png 
32
33 hb_data = standard_presets
34 hb_menu = ghb.desktop
35
36 builderdir = $(datadir)/ghb/builder
37 builder_DATA = ghb.ui
38
39 AM_CPPFLAGS = \
40         -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
41         -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
42         -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
43         $(GHB_CFLAGS)
44
45 AM_CFLAGS =\
46          -Wall\
47          -g
48
49 bin_PROGRAMS = ghb 
50 BUILT_SOURCES = HandBrakeCLI
51
52 HandBrakeCLI: $(HB_DIR)/HandBrakeCLI
53         /bin/cp $< $@
54
55 # Dummy file, not built.  Forces g++ linking
56 nodist_EXTRA_ghb_SOURCES = dummy.cpp
57
58 ghb_SOURCES = \
59         callbacks.c \
60         callbacks.h \
61         main.c \
62         settings.c \
63         settings.h \
64         hb-backend.c \
65         hb-backend.h \
66         renderer_button.h \
67         renderer_button.c \
68         ghb-dvd.c \
69         ghb-dvd.h 
70
71 ghb_LDFLAGS = \
72         -Wl,--export-dynamic
73
74 ghb_LDADD = $(GHB_LIBS) $(HB_LIBS)
75
76 ghb_DEPENDENCIES = $(HB_DIR)/libhb/libhb.a
77
78 EXTRA_DIST = $(builder_DATA) $(icons) HandBrakeCLI
79
80 uninstall-local:
81         for icon in $(icons); do \
82                 SIZE=`echo $$icon | cut -d. -f2`; \
83                 FILE=`echo $$icon | cut -d. -f1,3`; \
84                 if [ "$$SIZE" = "svg" ]; then \
85                         SIZE="scalable"; \
86                         FILE="$$FILE.svg"; \
87                 else \
88                         SIZE="$${SIZE}x$${SIZE}"; \
89                 fi; \
90                 rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
91         done
92         for file in $(hb_data); do \
93                 rm -f $(DESTDIR)/$(datadir)/ghb/$$file; \
94         done
95         rm -f $(DESTDIR)/$(datadir)/applications/$(hb_menu)
96
97 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/$(datadir)/icons/hicolor
98
99 install-exec-local:
100         $(INSTALL_PROGRAM) $(srcdir)/HandBrakeCLI $(DESTDIR)/$(bindir)/HandBrakeCLI
101
102 install-data-local:
103         for icon in $(icons); do \
104                 SIZE=`echo $$icon | cut -d. -f2`; \
105                 FILE=`echo $$icon | cut -d. -f1,3`; \
106                 if [ "$$SIZE" = "svg" ]; then \
107                         SIZE="scalable"; \
108                         FILE="$$FILE.svg"; \
109                 else \
110                         SIZE="$${SIZE}x$${SIZE}"; \
111                 fi; \
112                 mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
113                 $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
114         done
115         for file in $(hb_data); do \
116                 mkdir -p $(DESTDIR)/$(datadir)/ghb/; \
117                 $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)/$(datadir)/ghb/$$file; \
118         done
119         @-if test -n "$(DESTDIR)/$(datadir)"; then \
120                 echo "Updating Gtk icon cache."; \
121                 $(gtk_update_icon_cache); \
122         else \
123                 echo "*** Icon cache not updated. After install, run this:"; \
124                 echo "***   $(gtk_update_icon_cache)"; \
125         fi
126         mkdir -p $(DESTDIR)/$(datadir)/applications/; \
127         $(INSTALL_DATA) $(srcdir)/$(hb_menu) $(DESTDIR)/$(datadir)/applications/$(hb_menu)