6 abs_top_srcdir=@abs_top_srcdir@
8 exec_prefix=@exec_prefix@
11 libexecdir=@libexecdir@
12 sysconfdir=@sysconfdir@
13 sharedstatedir=@sharedstatedir@
14 localstatedir=@localstatedir@
16 includedir=@includedir@
17 oldincludedir=@oldincludedir@
18 datarootdir=@datarootdir@
23 PACKAGE_TARNAME=@PACKAGE_TARNAME@
34 INCLUDES+=$(sort @INCLUDES@)
35 INCLUDES+=-I@abs_top_srcdir@/lib
36 INCLUDES+=-I@abs_top_srcdir@/xbmc
37 ifneq (@USE_EXTERNAL_FFMPEG@,1)
38 INCLUDES+=-I@abs_top_srcdir@/lib/ffmpeg
40 INCLUDES+=-I@abs_top_srcdir@/xbmc/linux
44 -D__STDC_CONSTANT_MACROS \
45 -DBIN_INSTALL_PATH="\"$(libdir)/xbmc\"" \
46 -DINSTALL_PATH="\"$(datarootdir)/xbmc\"" \
51 ifeq ($(findstring osx,$(ARCH)), osx)
52 export MACOSX_DEPLOYMENT_TARGET=10.4
53 INCLUDES+=-I@abs_top_srcdir@/xbmc/osx
56 ifeq ($(ARCH), powerpc-osx)
61 SILENT_CPP=@echo "CPP $@";
62 SILENT_CC =@echo "CC $@";
63 SILENT_S =@echo "S $@";
64 SILENT_GCH=@echo "GCH $@";
65 SILENT_MM =@echo "MM $@";
66 SILENT_AR =@echo "AR $@";
72 $(SILENT_CPP) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.cpp=.o}
74 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
75 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
80 $(SILENT_CC) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.cc=.o}
82 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
83 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
88 $(SILENT_CC) $(CC) -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.c=.o}
90 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
91 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
96 $(SILENT_CC) $(CC) -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.C=.o}
98 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
99 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
104 $(SILENT_CC) $(CC) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.S=.o}
107 $(SILENT_GCH) $(CXX) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@
111 $(SILENT_MM) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.m=.o}
113 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
114 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
119 $(SILENT_MM) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.mm=.o}
121 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
122 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
125 OBJS+=$(filter %.o,$(SRCS:.cpp=.o))
126 OBJS+=$(filter %.o,$(SRCS:.c=.o))
127 OBJS+=$(filter %.o,$(SRCS:.S=.o))
128 OBJS+=$(filter %.o,$(SRCS:.mm=.o))
129 OBJS+=$(filter %.o,$(SRCS:.m=.o))
131 .PHONY : lib pch clean distclean distclean_evil
134 $(SILENT_AR) $(AR) $(ARFLAGS) $(LIB) $(OBJS)
136 pch: $(PCH:.h=.h.gch)
137 for d in $(DIRS); do (cd "$$d"; $(MAKE) pch ); done
140 $(RM) $(OBJS) *.o $(LIB) $(SLIB) $(CLEAN_FILES) $(PCH:.h=.h.gch) $(OBJS:.o=.P)
141 for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" clean); fi ); done
144 $(RM) $(OBJS) *.o $(LIB) $(SLIB) $(STATICLIB) $(CLEAN_FILES) $(DISTCLEAN_FILES) $(PCH:.h=.h.gch) $(OBJS:.o=.P)
145 for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" distclean || $(MAKE) -C "$$d" clean); fi ); done
146 if [ "$(shell pwd -P)" = "$(abs_top_srcdir)" ] || \
147 [ "$(shell pwd)" = "$(abs_top_srcdir)" ]; then rm -f $(AUTOGENERATED_MAKEFILES) Makefile.include Makefile; fi