From 5f3e21c5dea72ef4b7ebe3c55c75a8bd890353e9 Mon Sep 17 00:00:00 2001 From: Christian B Date: Wed, 15 Nov 2017 08:18:50 +0100 Subject: [PATCH] Some fixes to Makefile * Build on all available cores * Check for available GCC 4.9 on "EXTRA_CFLAGS += -Wno-date-time" --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f848e2a..2a3e8c3 100755 --- a/Makefile +++ b/Makefile @@ -15,8 +15,12 @@ EXTRA_CFLAGS += -Wno-unused-function EXTRA_CFLAGS += -Wno-unused EXTRA_CFLAGS += -Wno-date-time EXTRA_CFLAGS += -Wno-misleading-indentation -EXTRA_CFLAGS += -Wno-uninitialized -EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later +#EXTRA_CFLAGS += -Wno-uninitialized + +GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc ) +ifeq ($(GCC_VER_49),1) +EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later +endif EXTRA_CFLAGS += -I$(src)/include EXTRA_CFLAGS += -I$(src)/hal/phydm @@ -1866,7 +1870,7 @@ export CONFIG_RTL8812AU = m all: modules modules: - $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules + $(MAKE) -j $(shell nproc || echo 1) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules strip: $(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded