diff --git a/make/target-libs.mk b/make/target-libs.mk index f7460dd4..63758720 100644 --- a/make/target-libs.mk +++ b/make/target-libs.mk @@ -1384,16 +1384,23 @@ endif GRAPHLCD_BASE_DEPS = freetype libiconv libusb +GRAPHLCD_BASE_MAKE_OPTS = \ + $(BUILD_ENV) \ + CXXFLAGS+="-fPIC" \ + TARGET=$(TARGET_CROSS) \ + PREFIX= \ + DESTDIR=$(TARGET_DIR) + graphlcd-base: $(GRAPHLCD_BASE_DEPS) | $(TARGET_DIR) $(REMOVE)/$(GRAPHLCD_BASE_TMP) $(GET-GIT-SOURCE) $(GRAPHLCD_BASE_URL)/$(GRAPHLCD_BASE_SOURCE) $(ARCHIVE)/$(GRAPHLCD_BASE_SOURCE) $(CPDIR)/$(GRAPHLCD_BASE_TMP) $(CHDIR)/$(GRAPHLCD_BASE_TMP); \ $(call apply_patches, $(addprefix $(@)/,$(GRAPHLCD_BASE_PATCH))); \ - $(MAKE) -C glcdgraphics all TARGET=$(TARGET_CROSS) PREFIX= DESTDIR=$(TARGET_DIR); \ - $(MAKE) -C glcddrivers all TARGET=$(TARGET_CROSS) PREFIX= DESTDIR=$(TARGET_DIR); \ - $(MAKE) -C glcdgraphics install PREFIX= DESTDIR=$(TARGET_DIR); \ - $(MAKE) -C glcddrivers install PREFIX= DESTDIR=$(TARGET_DIR); \ + $(MAKE) $(GRAPHLCD_BASE_MAKE_OPTS) -C glcdgraphics all; \ + $(MAKE) $(GRAPHLCD_BASE_MAKE_OPTS) -C glcddrivers all; \ + $(MAKE) $(GRAPHLCD_BASE_MAKE_OPTS) -C glcdgraphics install; \ + $(MAKE) $(GRAPHLCD_BASE_MAKE_OPTS) -C glcddrivers install; \ $(INSTALL_DATA) -D graphlcd.conf $(TARGET_DIR)/etc/graphlcd.conf - $(REMOVE)/$(GRAPHLCD_BASE_TMP) + #$(REMOVE)/$(GRAPHLCD_BASE_TMP) $(TOUCH) diff --git a/patches/graphlcd-base/graphlcd.patch b/patches/graphlcd-base/graphlcd.patch index 8ac1d341..61b4caae 100644 --- a/patches/graphlcd-base/graphlcd.patch +++ b/patches/graphlcd-base/graphlcd.patch @@ -577,25 +577,6 @@ # two ifdef/endif are used because older installations may not support 'else ifdef' --- a/Make.config +++ b/Make.config -@@ -3,13 +3,13 @@ - - ### The C compiler and options: - --CC ?= gcc --CFLAGS ?= -O2 -+CC = $(TARGET)gcc -+CFLAGS = -pipe -Os - --CXX ?= g++ -+CXX = $(TARGET)g++ - --CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual --#CXXFLAGS ?= -g -ggdb -O0 -Wall -Woverloaded-virtual -+CXXFLAGS = -pipe -Os -Wall -Woverloaded-virtual -+#CXXFLAGS = -g -ggdb -O0 -Wall -Woverloaded-virtual - CXXFLAGS += -MMD -MP - - # CXX set to clang++: force clang @@ -59,7 +59,7 @@ HAVE_FREETYPE2=1