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\"" \
50 ifeq ($(findstring osx,$(ARCH)), osx)
51 export MACOSX_DEPLOYMENT_TARGET=10.4
52 INCLUDES+=-I@abs_top_srcdir@/xbmc/osx
55 ifeq ($(ARCH), powerpc-osx)
60 SILENT_CPP=@echo "CPP $@";
61 SILENT_CC =@echo "CC $@";
62 SILENT_S =@echo "S $@";
63 SILENT_GCH=@echo "GCH $@";
64 SILENT_MM =@echo "MM $@";
65 SILENT_AR =@echo "AR $@";
71 $(SILENT_CPP) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.cpp=.o}
73 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
74 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
79 $(SILENT_CC) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.cc=.o}
81 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
82 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
87 $(SILENT_CC) $(CC) -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.c=.o}
89 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
90 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
95 $(SILENT_CC) $(CC) -MD -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.C=.o}
97 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
98 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
103 $(SILENT_CC) $(CC) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.S=.o}
106 $(SILENT_GCH) $(CXX) -c $(CFLAGS) $(DEFINES) $(INCLUDES) $< -o $@
110 $(SILENT_MM) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.m=.o}
112 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
113 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
118 $(SILENT_MM) $(CXX) -MD -c $(CXXFLAGS) $(DEFINES) $(INCLUDES) $< -o ${<:.mm=.o}
120 sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\$$//' \
121 -e '/^$$/ d' -e 's/$$/ :/' < $*.d >> $*.P; \
124 OBJS+=$(filter %.o,$(SRCS:.cpp=.o))
125 OBJS+=$(filter %.o,$(SRCS:.c=.o))
126 OBJS+=$(filter %.o,$(SRCS:.S=.o))
127 OBJS+=$(filter %.o,$(SRCS:.mm=.o))
128 OBJS+=$(filter %.o,$(SRCS:.m=.o))
130 .PHONY : lib pch clean distclean distclean_evil
133 $(SILENT_AR) $(AR) $(ARFLAGS) $(LIB) $(OBJS)
135 pch: $(PCH:.h=.h.gch)
136 for d in $(DIRS); do (cd "$$d"; $(MAKE) pch ); done
139 $(RM) $(OBJS) *.o $(LIB) $(SLIB) $(CLEAN_FILES) $(PCH:.h=.h.gch) $(OBJS:.o=.P)
140 for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" clean); fi ); done
143 $(RM) $(OBJS) *.o $(LIB) $(SLIB) $(STATICLIB) $(CLEAN_FILES) $(DISTCLEAN_FILES) $(PCH:.h=.h.gch) $(OBJS:.o=.P)
144 for d in $(DIRS); do (if test -f "$$d/Makefile"; then ($(MAKE) -C "$$d" distclean || $(MAKE) -C "$$d" clean); fi ); done
145 if [ "$(shell pwd -P)" = "$(abs_top_srcdir)" ] || \
146 [ "$(shell pwd)" = "$(abs_top_srcdir)" ]; then rm -f $(AUTOGENERATED_MAKEFILES) Makefile.include Makefile; fi