diff options
author | phintuka <phintuka> | 2010-12-15 14:13:40 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-12-15 14:13:40 +0000 |
commit | 6d68e7ab319bb005a0cd5f96f719119d6e2f9537 (patch) | |
tree | d1a9b2d405955f3af06106a62c058410ad08c919 | |
parent | 0c625beb6518916e625f92df9c4eb5b47f1264e6 (diff) | |
download | xineliboutput-6d68e7ab319bb005a0cd5f96f719119d6e2f9537.tar.gz xineliboutput-6d68e7ab319bb005a0cd5f96f719119d6e2f9537.tar.bz2 |
Added simple VDR source tree detection.
VDR plugins won't be copied to LIBDIR when not building inside VDR source tree.
-rw-r--r-- | Makefile | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -4,7 +4,7 @@ # See the main source file 'xineliboutput.c' for copyright information and # how to reach the author. # -# $Id: Makefile,v 1.102 2010-12-11 21:10:19 phintuka Exp $ +# $Id: Makefile,v 1.103 2010-12-15 14:13:40 phintuka Exp $ # # The official name of this plugin. @@ -92,9 +92,10 @@ else APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h) endif +VDR_TREE = no ifeq ($(strip $(VDRVERSION)),) $(warning ********************************************************) - $(warning VDR not detected ! VDR plugin will not be compiled. ) + $(warning VDR not detected ! VDR plugins will not be compiled. ) $(warning ********************************************************) CONFIGURE_OPTS += --disable-vdr else @@ -103,6 +104,16 @@ else APIVERSION = $(VDRVERSION) endif CONFIGURE_OPTS += --add-cflags=-I$(VDRDIR) + + ifeq ($(VDRDIR), ../../..) + $(warning Building inside VDR source tree) + VDR_TREE = yes + else + $(warning ********************************************************) + $(warning VDR source tree not detected ! ) + $(warning VDR plugins will not be installed. ) + $(warning ********************************************************) + endif endif @@ -329,8 +340,10 @@ config: config.mak $(VDRPLUGIN): $(OBJS) $(OBJS_MPG) $(CXX) $(CXXFLAGS) $(LDFLAGS_SO) $(LDFLAGS) $(OBJS) $(OBJS_MPG) $(LIBS) $(LIBS_VDR) -o $@ +ifeq ($(VDR_TREE), yes) @-rm -rf $(LIBDIR)/$@ @cp $@ $(LIBDIR)/$@ +endif # Keep VDR Makefile happy - it requires $(LIBDIR)/.$(APIVERSION) somewhere in this file ... # @@ -339,8 +352,10 @@ $(VDRPLUGIN): $(OBJS) $(OBJS_MPG) $(VDRPLUGIN_SXFE): $(OBJS_SXFE_SO) $(CC) $(CFLAGS) $(LDFLAGS_SO) $(LDFLAGS) $(OBJS_SXFE_SO) $(LIBS_X11) $(LIBS_XINE) $(LIBS_JPEG) -o $@ +ifeq ($(VDR_TREE), yes) @-rm -rf $(LIBDIR)/$(VDRPLUGIN_SXFE) @cp $@ $(LIBDIR)/$(VDRPLUGIN_SXFE) +endif $(VDRSXFE): $(OBJS_SXFE) $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_SXFE) $(LIBS_X11) $(LIBS_XINE) $(LIBS_JPEG) $(LIBS_PTHREAD) -o $@ @@ -350,8 +365,10 @@ $(VDRSXFE): $(OBJS_SXFE) $(VDRPLUGIN_FBFE): $(OBJS_FBFE_SO) $(CC) $(CFLAGS) $(LDFLAGS_SO) $(LDFLAGS) $(OBJS_FBFE_SO) $(LIBS_XINE) $(LIBS_JPEG) -o $@ +ifeq ($(VDR_TREE), yes) @-rm -rf $(LIBDIR)/$(VDRPLUGIN_FBFE) @cp $@ $(LIBDIR)/$(VDRPLUGIN_FBFE) +endif $(VDRFBFE): $(OBJS_FBFE) $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_FBFE) $(LIBS_XINE) $(LIBS_JPEG) $(LIBS_PTHREAD) -o $@ |