Updated copiright notice.
[bertos.git] / rules.mk
old mode 100755 (executable)
new mode 100644 (file)
index 990fc39..0fe37a0
--- 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