[vlc-devel] commit: Move the executables out of src/ ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Aug 23 17:10:07 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Aug 23 18:12:40 2008 +0300| [83b35c64b6e1f7c90b577724d3e3a1fa57b7b747] | committer: Rémi Denis-Courmont 

Move the executables out of src/

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=83b35c64b6e1f7c90b577724d3e3a1fa57b7b747
---

 Makefile.am                     |   11 +++++---
 bin/Makefile.am                 |   41 ++++++++++++++++++++++++++++++
 {src/network => bin}/rootwrap.c |    0 
 {src => bin}/vlc.c              |    0 
 {src => bin}/winvlc.c           |    0 
 configure.ac                    |    1 +
 src/Makefile.am                 |   53 ---------------------------------------
 7 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c69649e..a96b241 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,7 +7,7 @@
 # which have makefiles with distribution information.
 #  - src (libvlc) is nedeed by modules, mozilla and bindings
 #  - libs/* are needed by modules
-BASE_SUBDIRS = po src modules share doc test
+BASE_SUBDIRS = po src bin modules share doc test
 EXTRA_SUBDIRS = m4 extras/package/ipkg \
 	libs/loader libs/srtp \
 	projects/mozilla projects/activex
@@ -20,6 +20,9 @@ endif
 if HAVE_LIBGCRYPT
 SUBDIRS += libs/srtp
 endif
+if BUILD_VLC
+SUBDIRS += bin
+endif
 SUBDIRS += modules share doc test
 if BUILD_MOZILLA
 SUBDIRS += projects/mozilla
@@ -313,8 +316,8 @@ DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in compile ChangeLog
 libvlc:
 	cd src && $(MAKE) $(AM_MAKEFLAGS) libvlccore.la
 
-core:
-	cd src && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT)
+core: libvlc
+	cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT)
 
 doc:
 	cd doc && $(MAKE) $(AM_MAKEFLAGS) doc
@@ -389,7 +392,7 @@ endif
 vlc$(EXEEXT): Makefile.am
 	rm -f -- vlc vlc.tmp
 	echo '#! /bin/sh' > vlc.tmp
-	echo 'exec "$$(dirname "$$0")/src/vlc$(EXEEXT)" "--plugin-path=$$(dirname "$$0")/modules" "$$@"' >> vlc.tmp
+	echo 'exec "$$(dirname "$$0")/bin/vlc$(EXEEXT)" "--plugin-path=$$(dirname "$$0")/modules" "$$@"' >> vlc.tmp
 	chmod +x vlc.tmp
 	mv -f -- vlc.tmp vlc
 
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644
index 0000000..141bb42
--- /dev/null
+++ b/bin/Makefile.am
@@ -0,0 +1,41 @@
+# Building vlc
+#
+bin_PROGRAMS = vlc
+EXTRA_PROGRAMS = vlc-wrapper
+
+if !HAVE_WIN32
+bin_PROGRAMS += vlc-wrapper
+endif
+
+EXTRA_vlc_SOURCES = vlc.c winvlc.c
+if !HAVE_WIN32
+vlc_SOURCES = vlc.c
+else
+vlc_SOURCES = winvlc.c
+endif
+vlc_wrapper_SOURCES = rootwrap.c
+
+vlc_DEPENDENCIES = $(DATA_win32_rc) ../src/libvlc.la
+
+vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
+vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
+# vlc needs libvlccore for locale conversion
+vlc_LDADD = ../src/libvlc.la ../src/libvlccore.la $(LTLIBINTL) \
+	`$(VLC_CONFIG) -libs vlc`
+
+#vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
+#	$(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)
+
+DATA_win32_rc = vlc_win32_rc.$(OBJEXT)
+DATA_win32_rc_lib = libvlc_win32_rc.$(OBJEXT)
+EXTRA_DATA = $(DATA_win32_rc) $(DATA_win32_rc_lib)
+if HAVE_WIN32
+vlc_LDADD += $(DATA_win32_rc)
+noinst_DATA = $(DATA_win32_rc) $(DATA_win32_rc_lib)
+endif
+
+vlc_win32_rc.$(OBJEXT): $(top_builddir)/share/vlc_win32_rc.rc
+	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
+
+libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
+	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
diff --git a/src/network/rootwrap.c b/bin/rootwrap.c
similarity index 100%
rename from src/network/rootwrap.c
rename to bin/rootwrap.c
diff --git a/src/vlc.c b/bin/vlc.c
similarity index 100%
rename from src/vlc.c
rename to bin/vlc.c
diff --git a/src/winvlc.c b/bin/winvlc.c
similarity index 100%
rename from src/winvlc.c
rename to bin/winvlc.c
diff --git a/configure.ac b/configure.ac
index e7dbaf9..81a4440 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5861,6 +5861,7 @@ AC_CONFIG_FILES([
   share/libvlc_win32_rc.rc
   src/Makefile
   src/test/Makefile
+  bin/Makefile
   test/Makefile
 ])
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 0bba8ee..84bfbe6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -439,59 +439,6 @@ misc/revision.c:
 
 
 ###############################################################################
-# Building vlc
-###############################################################################
-
-EXTRA_PROGRAMS = vlc vlc-wrapper
-if BUILD_VLC
-bin_PROGRAMS = vlc
-if !HAVE_WIN32
-bin_PROGRAMS += vlc-wrapper
-endif
-endif
-
-EXTRA_vlc_SOURCES = vlc.c winvlc.c
-if !HAVE_WIN32
-vlc_SOURCES = vlc.c
-else
-vlc_SOURCES = winvlc.c
-endif
-vlc_wrapper_SOURCES = network/rootwrap.c
-
-vlc_DEPENDENCIES = $(DATA_win32_rc) libvlc.la
-
-vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
-vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
-# vlc needs libvlccore for locale conversion
-vlc_LDADD = $(DATA_win32_rc) libvlc.la libvlccore.la $(LTLIBINTL) \
-	`$(VLC_CONFIG) -libs vlc`
-
-if BUILD_VLC
-vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES)
-	@rm -f vlc$(EXEEXT)
-	@case `$(VLC_CONFIG) --linkage vlc builtin` in \
-	  c++) cmd="$(CXXLINK)" ;; \
-	  objc) cmd="$(OBJCLINK)" ;; \
-	  c|*) cmd="$(LINK)" ;; \
-	esac ; \
-	cmd="$$cmd $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS)" ; \
-	echo $$cmd ; \
-	eval $$cmd
-
-if HAVE_WIN32
-DATA_win32_rc = vlc_win32_rc.$(OBJEXT)
-DATA_win32_rc_lib = libvlc_win32_rc.$(OBJEXT)
-noinst_DATA = $(DATA_win32_rc) $(DATA_win32_rc_lib)
-
-vlc_win32_rc.$(OBJEXT): $(top_builddir)/share/vlc_win32_rc.rc
-	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
-
-libvlc_win32_rc.$(OBJEXT): $(top_builddir)/share/libvlc_win32_rc.rc
-	$(WINDRES) --include-dir $(top_srcdir)/share -i $< -o $@
-endif
-endif
-
-###############################################################################
 # Unit/regression test
 ###############################################################################
 




More information about the vlc-devel mailing list