blob: 2dc61669752f7014087a4bca3e3f1fe64f2678f7 [file] [log] [blame]
From 563dafc1129848419482b540d149d0b8687cac1e Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Sun, 10 Apr 2016 16:22:53 +0200
Subject: [PATCH] Makefiles: clean up the cruft
Most of the variables that Makefile.include tries (but fails) to set,
are already available from Buildroot's variables:
- AR, AS, CC, CXX, OBJDUMP...
- CFLAGS, CXXFLAGS, CPPFLAGS...
This leaves us with a few select variables that define include and
library paths local to the omxplayer package, plus a few optimisations.
Finally, also remove hard-coded, absolute paths pointing to the host
system (won't work for cross-compilation, so our paranoid wrapper would
catch those paths).
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
Makefile | 2 +-
Makefile.include | 20 ++------------------
2 files changed, 3 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index bcfadfb..3dc1a03 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX
LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include
+INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/
DIST ?= omxplayer-dist
diff --git a/Makefile.include b/Makefile.include
index 58e9560..79ca277 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -20,21 +20,5 @@ 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
+CFLAGS += -fomit-frame-pointer -Wno-psabi -mno-apcs-stack-check \
+ -mstructure-size-boundary=32 -mno-sched-prolog
--
1.9.1