Makefile.am 1.97 KB
Newer Older
1 2 3
# Building vlc
#
bin_PROGRAMS = vlc
4
noinst_PROGRAMS = vlc-static
5
noinst_DATA =
6
vlclib_PROGRAMS = vlc-cache-gen
7
EXTRA_PROGRAMS = vlc-wrapper
8 9 10
EXTRA_DIST = vlc_win32_rc.rc.in

SUFFIXES = .rc.in .rc
11

12 13
AM_CPPFLAGS = $(CPPFLAGS_vlc)
AM_CFLAGS = $(CFLAGS_vlc)
14 15 16
if HAVE_DBUS
AM_CPPFLAGS += -DHAVE_DBUS
endif
17

18 19
if !HAVE_WIN32
bin_PROGRAMS += vlc-wrapper
20
vlc_SOURCES = vlc.c override.c
21
endif
22 23

EXTRA_vlc_SOURCES = vlc.c winvlc.c
24 25
if HAVE_WIN32
vlc_SOURCES = winvlc.c
26
noinst_DATA += vlc_win32_rc.rc
27 28
endif

29
vlc_wrapper_SOURCES = rootwrap.c
30
vlc_wrapper_LDADD = $(SOCKET_LIBS)
31

32
vlc_LDFLAGS = $(LDFLAGS_vlc)
33
vlc_LDADD = ../lib/libvlc.la $(LIBPTHREAD)
34

35
vlc_static_SOURCES = $(vlc_SOURCES)
36 37 38 39
vlc_static_CFLAGS = $(AM_CFLAGS) \
	-DTOP_BUILDDIR=\"$$(cd "$(top_builddir)"; pwd)\" \
	-DTOP_SRCDIR=\"$$(cd "$(top_srcdir)"; pwd)\" \
	$(NULL)
40 41
vlc_static_DEPENDENCIES = $(vlc_DEPENDENCIES)
vlc_static_LDADD = $(vlc_LDADD)
42
vlc_static_LDFLAGS = $(vlc_LDFLAGS)
43 44

if HAVE_WIN32
45
vlc_LDADD += -lpsapi -lwininet vlc_win32_rc.$(OBJEXT)
46
vlc_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
47
else
48
vlc_LDADD += $(LIBDL)
49
vlc_static_LDFLAGS += -no-install -static
50 51
endif

52
vlc_win32_rc.rc: $(top_builddir)/config.status vlc_win32_rc.rc.in
53 54 55 56
	cd "$(top_builddir)" && \
	$(SHELL) ./config.status --file="bin/$@"

vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc
57
	$(WINDRES) --include-dir $(top_srcdir)/share/icons --include-dir $(top_srcdir)/extras/package/win32 -i $< -o $@
58

59
vlc_cache_gen_SOURCES = cachegen.c
60
vlc_cache_gen_LDADD = \
61
	$(GNUGETOPT_LIBS) \
62
	../compat/libcompat.la \
63
	../lib/libvlc.la
64 65 66 67 68
if HAVE_WIN32
vlc_cache_gen_LDADD += vlc_win32_rc.$(OBJEXT)
vlc_cache_gen_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
endif

69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
#
# Plug-ins cache
#
noinst_DATA += ../modules/plugins.dat
MOSTLYCLEANFILES = $(noinst_DATA)

.PHONY: ../modules/plugins.dat

../modules/plugins.dat: vlc-cache-gen$(EXEEXT)
	$(AM_V_at)rm -f ../modules/plugins.dat
	$(AM_V_GEN)if test "$(build)" = "$(host)"; then \
		./vlc-cache-gen$(EXEEXT) ../modules ; \
	else \
		echo "Cross-compilation: cache generation skipped!" ; \
	fi