codec: omxil: use switch lut for string conversion
[vlc.git] / bin / Makefile.am
blob699fbd4bf0b2f246e38fb1e87a428230e47cb39b
1 # Building vlc
3 if BUILD_VLC
4 if HAVE_OSX
5 bin_PROGRAMS = vlc-osx
6 noinst_PROGRAMS = vlc-osx-static
7 else
8 bin_PROGRAMS = vlc
9 noinst_PROGRAMS = vlc-static
10 endif
11 endif
12 EXTRA_DIST = vlc_win32_rc.rc.in
13 CLEANFILES = vlc_win32_rc.rc
15 SUFFIXES = .rc.in .rc
17 AM_CPPFLAGS = $(CPPFLAGS_vlc)
18 AM_CFLAGS = $(CFLAGS_vlc)
19 if HAVE_DBUS
20 AM_CPPFLAGS += -DHAVE_DBUS
21 endif
24 # Main VLC executable
26 vlc_LDADD = ../lib/libvlc.la
27 vlc_CPPFLAGS = $(AM_CPPFLAGS)
28 if !HAVE_WIN32
29 vlc_SOURCES = vlc.c override.c
30 vlc_LDADD += $(LIBDL)
31 else
32 vlc_SOURCES = winvlc.c
33 vlc_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
34 vlc_LDFLAGS = -mwindows -Wc,-static
35 vlc_LDADD += vlc_win32_rc.$(OBJEXT)
36 libbreakpad_wrapper_la_SOURCES = breakpad.cpp
37 libbreakpad_wrapper_la_LIBADD = $(BREAKPAD_LIBS)
38 libbreakpad_wrapper_la_LDFLAGS = -static
39 libbreakpad_wrapper_la_CXXFLAGS = $(AM_CXXFLAGS) $(BREAKPAD_CFLAGS) -DBREAKPAD_URL=\"@BREAKPAD_URL@\"
40 if HAVE_BREAKPAD
41 noinst_LTLIBRARIES = libbreakpad_wrapper.la
42 vlc_LDADD += libbreakpad_wrapper.la -lstdc++ -lwininet
43 vlc_DEPENDENCIES += libbreakpad_wrapper.la
44 vlc_CPPFLAGS += -DHAVE_BREAKPAD
45 endif
46 endif
48 vlc_osx_SOURCES = darwinvlc.m
49 vlc_osx_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,CoreFoundation,-framework,Cocoa
50 vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "$(libdir)"
51 if HAVE_BREAKPAD
52 vlc_osx_LDFLAGS += -Wl,-framework,Breakpad
53 vlc_osx_OBJCFLAGS = -F$(CONTRIB_DIR)/Frameworks
54 vlc_osx_CPPFLAGS = -DHAVE_BREAKPAD
55 endif
56 vlc_osx_LDADD = ../lib/libvlc.la
58 vlc_osx_static_SOURCES = $(vlc_osx_SOURCES)
59 vlc_osx_static_OBJCFLAGS = $(AM_OBJCFLAGS) \
60         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
61         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
62         $(NULL)
63 vlc_osx_static_LDFLAGS = $(vlc_osx_LDFLAGS) -static
64 vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../lib/.libs/"
65 vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../src/.libs/"
66 vlc_osx_static_LDADD = $(vlc_osx_LDADD)
67 if HAVE_BREAKPAD
68 vlc_osx_static_LDFLAGS += -Wl,-framework,Breakpad
69 vlc_osx_static_OBJCFLAGS += -F$(CONTRIB_DIR)/Frameworks
70 vlc_osx_static_CPPFLAGS = -DHAVE_BREAKPAD
71 endif
75 # Static (debug) VLC executable
77 vlc_static_SOURCES = $(vlc_SOURCES)
78 vlc_static_CFLAGS = $(AM_CFLAGS) \
79         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
80         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
81         $(NULL)
82 vlc_static_CPPFLAGS = $(vlc_CPPFLAGS)
83 vlc_static_DEPENDENCIES = $(vlc_DEPENDENCIES)
84 vlc_static_LDADD = $(vlc_LDADD)
85 vlc_static_LDFLAGS = $(vlc_LDFLAGS) -no-install -static
88 # Root wrapper
90 if BUILD_VLC
91 if !HAVE_WIN32
92 if !HAVE_OS2
93 bin_PROGRAMS += vlc-wrapper
94 endif
95 endif
96 endif
97 vlc_wrapper_SOURCES = rootwrap.c
98 vlc_wrapper_LDADD = $(SOCKET_LIBS)
100 vlc_win32_rc.rc: $(top_builddir)/config.status vlc_win32_rc.rc.in
101         cd "$(top_builddir)" && \
102         $(SHELL) ./config.status --file="bin/$@"
104 vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc $(top_srcdir)/extras/package/win32/vlc.exe.manifest
105         $(WINDRES) --include-dir $(top_srcdir)/share/icons --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
108 # Plug-ins cache generator
110 if HAVE_DYNAMIC_PLUGINS
111 pkglibexec_PROGRAMS = vlc-cache-gen
112 endif
113 vlc_cache_gen_SOURCES = cachegen.c
114 vlc_cache_gen_LDADD = \
115         $(GNUGETOPT_LIBS) \
116         ../compat/libcompat.la \
117         ../lib/libvlc.la
118 if HAVE_WIN32
119 vlc_cache_gen_LDADD += vlc_win32_rc.$(OBJEXT)
120 vlc_cache_gen_LDFLAGS = -Wc,-static
121 vlc_cache_gen_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
122 endif
125 # Plug-ins cache
127 if HAVE_DYNAMIC_PLUGINS
128 noinst_DATA = ../modules/plugins.dat
129 endif
130 MOSTLYCLEANFILES = $(noinst_DATA)
132 if HAVE_OSX
133 if BUILD_VLC
134 install-data-local:
135         cd "$(DESTDIR)$(bindir)"; mv vlc-osx vlc
137 endif
138 endif
140 .PHONY: ../modules/plugins.dat
142 ../modules/plugins.dat: vlc-cache-gen$(EXEEXT)
143         $(AM_V_at)rm -f ../modules/plugins.dat
144         $(AM_V_GEN)if test "$(build)" = "$(host)"; then \
145                 ./vlc-cache-gen$(EXEEXT) `realpath ../modules` ; \
146         else \
147                 echo "Cross-compilation: cache generation skipped!" ; \
148         fi