[vlc-devel] commit: Build (linux|not)_specific.c as appropriate ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat May 10 10:31:52 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sat May 10 11:33:00 2008 +0300| [3e1fea390e453b25f50d1e4308b80a4a962b8564]
Build (linux|not)_specific.c as appropriate
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3e1fea390e453b25f50d1e4308b80a4a962b8564
---
configure.ac | 1 +
src/Makefile.am | 22 +++++++++++++++++++---
src/libvlc.h | 20 --------------------
3 files changed, 20 insertions(+), 23 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7b3c50b..e8f9a86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -346,6 +346,7 @@ case "${host_os}" in
esac
AM_CONDITIONAL(HAVE_BEOS, test "${SYS}" = "beos")
AM_CONDITIONAL(HAVE_DARWIN, test "${SYS}" = "darwin")
+AM_CONDITIONAL(HAVE_LINUX, [test "${SYS}" = "linux"])
AM_CONDITIONAL(HAVE_WIN32, test "${SYS}" = "mingw32")
AM_CONDITIONAL(HAVE_WINCE, test "${SYS}" = "mingwce")
diff --git a/src/Makefile.am b/src/Makefile.am
index 7d25a7c..b2a16ee 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -173,6 +173,7 @@ libvlc_la_CFLAGS = `$(VLC_CONFIG) --cflags libvlc` \
-DLOCALEDIR=\"$(localedir)\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DDATA_PATH=\"$(pkgdatadir)\" \
+ -DLIBDIR=\"$(libdir)\" \
-DPLUGIN_PATH=\"$(pkglibdir)\"
libvlc_la_CXXFLAGS = `$(VLC_CONFIG) --cxxflags libvlc`
libvlc_la_OBJCFLAGS = `$(VLC_CONFIG) --objcflags libvlc`
@@ -201,23 +202,32 @@ endif
EXTRA_libvlc_la_SOURCES = \
$(SOURCES_libvlc_beos) \
$(SOURCES_libvlc_darwin) \
+ $(SOURCES_libvlc_linux) \
$(SOURCES_libvlc_win32) \
+ $(SOURCES_libvlc_other) \
$(SOURCES_libvlc_dirent) \
$(SOURCES_libvlc_getopt) \
$(SOURCES_libvlc_sout) \
$(NULL)
if HAVE_BEOS
libvlc_la_SOURCES += $(SOURCES_libvlc_beos)
-endif
+else
if HAVE_DARWIN
libvlc_la_SOURCES += $(SOURCES_libvlc_darwin)
-endif
+else
+if HAVE_LINUX
+libvlc_la_SOURCES += $(SOURCES_libvlc_linux)
+else
if HAVE_WIN32
libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
-endif
+else
if HAVE_WINCE
libvlc_la_SOURCES += $(SOURCES_libvlc_win32)
endif
+endif
+endif
+endif
+endif
if BUILD_DIRENT
libvlc_la_SOURCES += $(SOURCES_libvlc_dirent)
endif
@@ -236,11 +246,17 @@ SOURCES_libvlc_darwin = \
misc/darwin_specific.c \
$(NULL)
+SOURCES_libvlc_linux = \
+ misc/linux_specific.c \
+ $(NULL)
+
SOURCES_libvlc_win32 = \
misc/win32_specific.c \
network/winsock.c \
$(NULL)
+SOURCES_libvlc_other = misc/not_specific.c
+
SOURCES_libvlc_dirent = \
extras/dirent.c \
$(NULL)
diff --git a/src/libvlc.h b/src/libvlc.h
index 8b42355..b0b00db 100644
--- a/src/libvlc.h
+++ b/src/libvlc.h
@@ -40,19 +40,6 @@ void system_Init ( libvlc_int_t *, int *, const char *[] );
void system_Configure ( libvlc_int_t *, int *, const char *[] );
void system_End ( libvlc_int_t * );
-#if defined( SYS_BEOS )
-/* Nothing at the moment, create beos_specific.h when needed */
-#elif defined( __APPLE__ )
-/* Nothing at the moment, create darwin_specific.h when needed */
-#elif defined( WIN32 ) || defined( UNDER_CE )
-
-#else
-# define system_Init( a, b, c ) (void)0
-# define system_Configure( a, b, c ) (void)0
-# define system_End( a ) (void)0
-#endif
-
-
/*
* Threads subsystem
*/
@@ -154,14 +141,7 @@ typedef struct libvlc_global_data_t
module_bank_t * p_module_bank; ///< The module bank
- /* Arch-specific variables */
-#if defined( SYS_BEOS )
char * psz_vlcpath;
-#elif defined( __APPLE__ )
- char * psz_vlcpath;
-#elif defined( WIN32 )
- char * psz_vlcpath;
-#endif
} libvlc_global_data_t;
More information about the vlc-devel
mailing list