Makefile.am 1.93 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 17
if !HAVE_WIN32
bin_PROGRAMS += vlc-wrapper
18
vlc_SOURCES = vlc.c override.c
19
endif
20 21

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

27
vlc_wrapper_SOURCES = rootwrap.c
28
vlc_wrapper_LDADD = $(SOCKET_LIBS)
29

30
vlc_LDFLAGS = $(LDFLAGS_vlc)
31
vlc_LDADD = ../lib/libvlc.la $(LIBS_vlc)
32

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

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

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

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

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

67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
#
# 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