From 19c9bc5fd8f43d3e9117906c3c48a3891357f8bc Mon Sep 17 00:00:00 2001
From: Andrei Gherzan <andrei@gherzan.ro>
Date: Tue, 20 Aug 2013 16:10:51 +0300
Subject: [PATCH] Remove Makefile.include which includes hardcoded

Remove Makefile.include which includes hardcoded paths and rely on
variables provided by build system.

Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>

Updated patch to apply to c0dd9502ed2c43c487674939195c69680f3d98b0 revision

---
 Makefile         |  1 -
 Makefile.ffmpeg  |  1 -
 Makefile.include | 40 ----------------------------------------
 3 files changed, 42 deletions(-)
 delete mode 100644 Makefile.include

diff --git a/Makefile b/Makefile
index 2857e94..76ee9bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,3 @@
-include Makefile.include
 
 CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG  -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
 
diff --git a/Makefile.ffmpeg b/Makefile.ffmpeg
index ea12aad..749f47f 100644
--- a/Makefile.ffmpeg
+++ b/Makefile.ffmpeg
@@ -1,4 +1,3 @@
-include Makefile.include
 
 CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG  -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT
 
diff --git a/Makefile.include b/Makefile.include
deleted file mode 100644
index 58e9560..0000000
--- a/Makefile.include
+++ /dev/null
@@ -1,40 +0,0 @@
-USE_BUILDROOT=0
-FLOAT=hard
-
-ifeq ($(USE_BUILDROOT), 1)
-BUILDROOT	:=/opt/xbmc-bcm/buildroot
-SDKSTAGE	:=$(BUILDROOT)/output/staging
-TARGETFS	:=$(BUILDROOT)/output/target
-TOOLCHAIN	:=$(BUILDROOT)/output/host/usr/
-HOST			:=arm-unknown-linux-gnueabi
-SYSROOT		:=$(BUILDROOT)/output/host/usr/arm-unknown-linux-gnueabi/sysroot
-else
-BUILDROOT	:=/opt/bcm-rootfs
-SDKSTAGE	:=/opt/bcm-rootfs
-TARGETFS	:=/opt/bcm-rootfs
-TOOLCHAIN	:=/home/dc4/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/
-HOST		:=arm-linux-gnueabihf
-#SYSROOT		:=$(TOOLCHAIN)/arm-bcm2708hardfp-linux-gnueabi/sysroot
-SYSROOT		:=/opt/bcm-rootfs
-endif
-
-JOBS=7
-
-CFLAGS			:= -isystem$(PREFIX)/include
-CXXFLAGS		:= $(CFLAGS)
-CPPFLAGS		:= $(CFLAGS)
-LDFLAGS			:= -L$(BUILDROOT)/lib
-LD					:= $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
-CC					:= $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
-CXX         := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
-OBJDUMP			:= $(TOOLCHAIN)/bin/$(HOST)-objdump
-RANLIB			:= $(TOOLCHAIN)/bin/$(HOST)-ranlib
-STRIP				:= $(TOOLCHAIN)/bin/$(HOST)-strip
-AR 					:= $(TOOLCHAIN)/bin/$(HOST)-ar
-CXXCP 			:= $(CXX) -E
-PATH 				:= $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
-
-CFLAGS			+= -pipe -mfloat-abi=$(FLOAT) -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog
-LDFLAGS			+= -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build
-#INCLUDES		+= -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2
-INCLUDES		+= -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include
