Makefile.am 1.98 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_WIN32
17
if !HAVE_WINCE
18
bin_PROGRAMS += vlc-wrapper
19
vlc_SOURCES = vlc.c override.c
20
endif
21 22 23
endif

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
if HAVE_WINCE
29 30
vlc_SOURCES = winvlc.c
endif
31

32
vlc_wrapper_SOURCES = rootwrap.c
33
vlc_wrapper_LDADD = $(SOCKET_LIBS)
34

35
vlc_LDFLAGS = $(LDFLAGS_vlc)
36
vlc_LDADD = ../lib/libvlc.la ../src/libvlccore.la $(LIBS_vlc)
37

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

if HAVE_WIN32
48
vlc_LDADD += -lwininet vlc_win32_rc.$(OBJEXT)
49
vlc_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
50
else
51
vlc_LDADD += $(LIBDL)
52
vlc_static_LDFLAGS += -no-install -static
53 54
endif

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

vlc_win32_rc.$(OBJEXT): vlc_win32_rc.rc
Christophe Mutricy's avatar
Christophe Mutricy committed
60
	$(WINDRES) --include-dir $(top_srcdir)/share/icons -i $< -o $@
61

62 63
vlc_cache_gen_SOURCES = cachegen.c
vlc_cache_gen_LDADD = \
64
	$(GNUGETOPT_LIBS) \
65
	../compat/libcompat.la \
66
	../lib/libvlc.la ../src/libvlccore.la
67 68 69 70 71
if HAVE_WIN32
vlc_cache_gen_LDADD += vlc_win32_rc.$(OBJEXT)
vlc_cache_gen_DEPENDENCIES = vlc_win32_rc.$(OBJEXT)
endif

72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
#
# 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