-AR=ar
+AR=@AR@
ARFLAGS=crus
RM=rm -rf
SHELL=@SHELL@
ARCH=@ARCH@
abs_top_srcdir=@abs_top_srcdir@
+rel_top_srcdir=$(subst $(abspath $(abs_top_srcdir))/,,$(abspath $(CURDIR))/)
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
CXXFLAGS+=@CXXFLAGS@
CFLAGS+=@CFLAGS@
LDFLAGS+=@LDFLAGS@
-INCLUDES+=$(sort @INCLUDES@)
INCLUDES+=-I@abs_top_srcdir@/lib
INCLUDES+=-I@abs_top_srcdir@/xbmc
+INCLUDES+=$(sort @INCLUDES@)
ifneq (@USE_EXTERNAL_FFMPEG@,1)
INCLUDES+=-I@abs_top_srcdir@/lib/ffmpeg
endif
INCLUDES+=-I@abs_top_srcdir@/xbmc/linux
INCLUDES+=-I@abs_top_srcdir@/xbmc/cores/dvdplayer
+ifeq (@USE_OMXPLAYER@,1)
+INCLUDES+=-I@abs_top_srcdir@/xbmc/cores/AudioEngine
+INCLUDES+=-I@abs_top_srcdir@/xbmc/cores/AudioEngine/Utils
+endif
DEFINES+= \
@ARCH_DEFINES@ \
-D_FILE_DEFINED \
@DEFS@ \
ifeq ($(findstring osx,$(ARCH)), osx)
- export MACOSX_DEPLOYMENT_TARGET=10.4
INCLUDES+=-I@abs_top_srcdir@/xbmc/osx
endif
endif
ifneq ($(V), 1)
- SILENT_CPP=@echo "CPP $@";
- SILENT_CC =@echo "CC $@";
- SILENT_S =@echo "S $@";
- SILENT_GCH=@echo "GCH $@";
- SILENT_MM =@echo "MM $@";
- SILENT_AR =@echo "AR $@";
+ SILENT_CPP=@echo "CPP $(rel_top_srcdir)$@";
+ SILENT_CC =@echo "CC $(rel_top_srcdir)$@";
+ SILENT_S =@echo "S $(rel_top_srcdir)$@";
+ SILENT_GCH=@echo "GCH $(rel_top_srcdir)$@";
+ SILENT_MM =@echo "MM $(rel_top_srcdir)$@";
+ SILENT_AR =@echo "AR $(rel_top_srcdir)$@";
+ SILENT_LD =@echo "LD $(rel_top_srcdir)$@";
endif
OBJS+=$(filter %.o,$(SRCS:.cpp=.o))
&& sed -e 's/\#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
-e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P \
&& rm -f $*.d \
- || rm -f $*.P $@
+ || ( rm -f $*.P $@ && exit 1 )
%.o: %.cpp
@rm -f $@
- $(SILENT_CPP) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
+ $(SILENT_CPP) $(CXX) -MF $*.d -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
&& $(GEN_DEPS)
%.o: %.cc
@rm -f $@
- $(SILENT_CC) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
+ $(SILENT_CPP) $(CXX) -MF $*.d -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
&& $(GEN_DEPS)
%.o: %.c
@rm -f $@
- $(SILENT_CC) $(CC) -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
+ $(SILENT_CC) $(CC) -MF $*.d -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
&& $(GEN_DEPS)
%.o: %.C
@rm -f $@
- $(SILENT_CC) $(CC) -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
+ $(SILENT_CPP) $(CXX) -MF $*.d -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
&& $(GEN_DEPS)
%.o: %.S
%.o: %.m
@rm -f $@
- $(SILENT_MM) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
+ $(SILENT_MM) $(CXX) -MF $*.d -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
&& $(GEN_DEPS)
%.o: %.mm
@rm -f $@
- $(SILENT_MM) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
+ $(SILENT_MM) $(CXX) -MF $*.d -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o $@ \
&& $(GEN_DEPS)
-.PHONY : lib pch clean distclean distclean_evil
+.PHONY : lib pch clean distclean distclean_evil check testsuite
$(LIB): $(OBJS)
$(SILENT_AR) $(AR) $(ARFLAGS) $(LIB) $(OBJS)
clean:
$(RM) $(OBJS) *.o $(LIB) $(SLIB) $(CLEAN_FILES) $(PCH:.h=.h.gch) $(DEPS)
for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" clean); fi ); done
+ for d in $(CHECK_DIRS) $(GTEST_DIR); do if test -f $$d/Makefile; then $(MAKE) -C $$d $@; fi; done
distclean:
$(RM) $(OBJS) *.o $(LIB) $(SLIB) $(STATICLIB) $(CLEAN_FILES) $(DISTCLEAN_FILES) $(PCH:.h=.h.gch) $(DEPS)
for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" distclean || $(MAKE) -C "$$d" clean); fi ); done
+ for d in $(CHECK_DIRS) $(GTEST_DIR); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" $@ || $(MAKE) -C "$$d" clean); fi ); done
if [ "$(shell pwd -P)" = "$(abs_top_srcdir)" ] || \
[ "$(shell pwd)" = "$(abs_top_srcdir)" ]; then rm -f $(AUTOGENERATED_MAKEFILES) Makefile.include Makefile; fi