#
# LINUX_DIR .. location of Linux kernel sources
# RTL_DIR .. location of RT-Linux sources
+# CFLAGS .. C compiler flags
+# CXXFLAGS .. C++ compiler flags
# Hack to check RT-Linux rules
#LINUX_DIR := /home/cvs/ocera/ocera-build/kernel/linux
#CONFIG_RTLINUX = y
#OCERA_DIR := $(shell ( cd -L $(MAKERULES_DIR)/../../.. ; pwd -L ) )
-#CFLAGS += -ggdb
-CFLAGS += -O2
-CFLAGS += -Wall
-#CXXFLAGS += -ggdb
-CXXFLAGS += -O2
-CXXFLAGS += -Wall
+# Assign default values to CFLAGS variable. If the variable is defined
+# earlier (i.g. in config.omk), it is not overriden here.
+CFLAGS ?= -O2 -Wall
+CXXFLAGS ?= -O2 -Wall
CPPFLAGS += -I $(USER_INCLUDE_DIR)
--- /dev/null
+#!/bin/sh
+
+source ../functions.sh
+
+touch config.omk-default
+echo "CFLAGS=-DNUMBER=123" > config.omk
+make||error "Can't compile program with custom CFLAGS"
+_compiled/bin/test|grep 123 || error "Custom CFLAGS didn't influence the output"