X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=rules.mk;h=0fe37a0f8f98c0c967d2595a7be7d54653653750;hb=77c1d6ba65a199f60faa0e0a68e63ef0eb87677c;hp=990fc39d25c4d1453872986cd6c70d9c5a39bef1;hpb=8f410de98a38da826788f2b5a2c5581b2231041b;p=bertos.git diff --git a/rules.mk b/rules.mk old mode 100755 new mode 100644 index 990fc39d..0fe37a0f --- a/rules.mk +++ b/rules.mk @@ -24,6 +24,12 @@ Q := @ L := @echo endif +# Checker build +ifeq ($(C),1) +CC = $(CHECKER) +CFLAGS += -Wundef -D__x86_64__=1 -D__unix__=1 -D__linux__=1 -D__STDC_VERSION__=199901L +endif + # Initialize $(top_srcdir) with current directory, unless it was already initialized top_srcdir ?= $(shell pwd) @@ -57,6 +63,14 @@ $(1)_ASFLAGS += -mmcu=$$($(1)_MCU) $(1)_CPPAFLAGS += -mmcu=$$($(1)_MCU) $(1)_LDFLAGS += -mmcu=$$($(1)_MCU) endif +ifneq ($$(strip $$($(1)_CPU)),) +# Define all project specific object files +$(1)_CFLAGS += -mcpu=$$($(1)_CPU) +$(1)_CXXFLAGS += -mcpu=$$($(1)_CPU) +$(1)_ASFLAGS += -mcpu=$$($(1)_CPU) +$(1)_CPPAFLAGS += -mcpu=$$($(1)_CPU) +$(1)_LDFLAGS += -mcpu=$$($(1)_CPU) +endif ifneq ($$(strip $$($(1)_LDSCRIPT)),) $(1)_LDFLAGS += -Wl,-T$$($(1)_LDSCRIPT) endif