d3d11va: fix Winstore compilation
[vlc.git] / bin / Makefile.am
blobd464b08959e5347b65c8fff507c99da3b0d941ba
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 $(LIBPTHREAD)
27 if !HAVE_WIN32
28 vlc_SOURCES = vlc.c override.c
29 vlc_LDADD += $(LIBDL)
30 else
31 vlc_SOURCES = winvlc.c
32 vlc_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
33 vlc_LDFLAGS = -mwindows
34 vlc_LDADD += -lpsapi vlc_win32_rc.$(OBJEXT)
35 endif
37 vlc_osx_SOURCES = darwinvlc.m
38 vlc_osx_LDFLAGS = $(LDFLAGS_vlc) -Wl,-framework,CoreFoundation,-framework,Cocoa
39 vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/lib/"
40 vlc_osx_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/plugins/"
41 if HAVE_BREAKPAD
42 vlc_osx_LDFLAGS += -Wl,-framework,Breakpad
43 vlc_osx_OBJCFLAGS = -F$(CONTRIB_DIR)/Frameworks
44 endif
45 vlc_osx_LDADD = ../lib/libvlc.la
47 vlc_osx_static_SOURCES = $(vlc_osx_SOURCES)
48 vlc_osx_static_OBJCFLAGS = $(AM_OBJCFLAGS) \
49         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
50         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
51         $(NULL)
52 vlc_osx_static_LDFLAGS = $(vlc_osx_LDFLAGS) -static
53 vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../lib/.libs/"
54 vlc_osx_static_LDFLAGS += -Xlinker -rpath -Xlinker "@executable_path/../src/.libs/"
55 vlc_osx_static_LDADD = $(vlc_osx_LDADD)
56 if HAVE_BREAKPAD
57 vlc_osx_static_LDFLAGS += -Wl,-framework,Breakpad
58 vlc_osx_static_OBJCFLAGS += -F$(CONTRIB_DIR)/Frameworks
59 endif
63 # Static (debug) VLC executable
65 vlc_static_SOURCES = $(vlc_SOURCES)
66 vlc_static_CFLAGS = $(AM_CFLAGS) \
67         -DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
68         -DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
69         $(NULL)
70 vlc_static_DEPENDENCIES = $(vlc_DEPENDENCIES)
71 vlc_static_LDADD = $(vlc_LDADD)
72 vlc_static_LDFLAGS = $(vlc_LDFLAGS) -no-install -static
75 # Root wrapper
77 if BUILD_VLC
78 if !HAVE_WIN32
79 if !HAVE_OS2
80 bin_PROGRAMS += vlc-wrapper
81 endif
82 endif
83 endif
84 vlc_wrapper_SOURCES = rootwrap.c
85 vlc_wrapper_LDADD = $(SOCKET_LIBS)
87 vlc_win32_rc.rc: $(top_builddir)/config.status vlc_win32_rc.rc.in
88         cd "$(top_builddir)" && \
89         $(SHELL) ./config.status --file="bin/$@"
91 vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc $(top_srcdir)/extras/package/win32/vlc.exe.manifest
92         $(WINDRES) --include-dir $(top_srcdir)/share/icons --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
95 # Plug-ins cache generator
97 if HAVE_DYNAMIC_PLUGINS
98 vlclib_PROGRAMS = vlc-cache-gen
99 endif
100 vlc_cache_gen_SOURCES = cachegen.c
101 vlc_cache_gen_LDADD = \
102         $(GNUGETOPT_LIBS) \
103         ../compat/libcompat.la \
104         ../lib/libvlc.la
105 if HAVE_WIN32
106 vlc_cache_gen_LDADD += vlc_win32_rc.$(OBJEXT)
107 vlc_cache_gen_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
108 endif
111 # Plug-ins cache
113 if HAVE_DYNAMIC_PLUGINS
114 noinst_DATA = ../modules/plugins.dat
115 endif
116 MOSTLYCLEANFILES = $(noinst_DATA)
118 if HAVE_OSX
119 install-data-local:
120         cd $(bindir); mv vlc-osx vlc
122 endif
124 .PHONY: ../modules/plugins.dat
126 ../modules/plugins.dat: vlc-cache-gen$(EXEEXT)
127         $(AM_V_at)rm -f ../modules/plugins.dat
128         $(AM_V_GEN)if test "$(build)" = "$(host)"; then \
129                 ./vlc-cache-gen$(EXEEXT) `realpath ../modules` ; \
130         else \
131                 echo "Cross-compilation: cache generation skipped!" ; \
132         fi