live555: dtsgen: reset depth on seek
[vlc.git] / bin / Makefile.am
blob51464d419b7614d6d460614f21de7815d3ebfd5f
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
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 "@executable_path/lib/"
51 vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/plugins/"
52 if HAVE_BREAKPAD
53 vlc_osx_LDFLAGS += -Wl,-framework,Breakpad
54 vlc_osx_OBJCFLAGS = -F$(CONTRIB_DIR)/Frameworks
55 vlc_osx_CPPFLAGS = -DHAVE_BREAKPAD
56 endif
57 vlc_osx_LDADD = ../lib/libvlc.la
59 vlc_osx_static_SOURCES = $(vlc_osx_SOURCES)
60 vlc_osx_static_OBJCFLAGS = $(AM_OBJCFLAGS) \
61         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
62         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
63         $(NULL)
64 vlc_osx_static_LDFLAGS = $(vlc_osx_LDFLAGS) -static
65 vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../lib/.libs/"
66 vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../src/.libs/"
67 vlc_osx_static_LDADD = $(vlc_osx_LDADD)
68 if HAVE_BREAKPAD
69 vlc_osx_static_LDFLAGS += -Wl,-framework,Breakpad
70 vlc_osx_static_OBJCFLAGS += -F$(CONTRIB_DIR)/Frameworks
71 vlc_osx_static_CPPFLAGS = -DHAVE_BREAKPAD
72 endif
76 # Static (debug) VLC executable
78 vlc_static_SOURCES = $(vlc_SOURCES)
79 vlc_static_CFLAGS = $(AM_CFLAGS) \
80         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
81         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
82         $(NULL)
83 vlc_static_CPPFLAGS = $(vlc_CPPFLAGS)
84 vlc_static_DEPENDENCIES = $(vlc_DEPENDENCIES)
85 vlc_static_LDADD = $(vlc_LDADD)
86 vlc_static_LDFLAGS = $(vlc_LDFLAGS) -no-install -static
89 # Root wrapper
91 if BUILD_VLC
92 if !HAVE_WIN32
93 if !HAVE_OS2
94 bin_PROGRAMS += vlc-wrapper
95 endif
96 endif
97 endif
98 vlc_wrapper_SOURCES = rootwrap.c
99 vlc_wrapper_LDADD = $(SOCKET_LIBS)
101 vlc_win32_rc.rc: $(top_builddir)/config.status vlc_win32_rc.rc.in
102         cd "$(top_builddir)" && \
103         $(SHELL) ./config.status --file="bin/$@"
105 vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc $(top_srcdir)/extras/package/win32/vlc.exe.manifest
106         $(WINDRES) --include-dir $(top_srcdir)/share/icons --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
109 # Plug-ins cache generator
111 if HAVE_DYNAMIC_PLUGINS
112 pkglibexec_PROGRAMS = vlc-cache-gen
113 endif
114 vlc_cache_gen_SOURCES = cachegen.c
115 vlc_cache_gen_LDADD = \
116         $(GNUGETOPT_LIBS) \
117         ../compat/libcompat.la \
118         ../lib/libvlc.la
119 if HAVE_WIN32
120 vlc_cache_gen_LDADD += vlc_win32_rc.$(OBJEXT)
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 $(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