This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
additional compiler options in cdl script
- From: "mohanlal jangir" <mohanlaljangir at hotmail dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 13 Aug 2003 20:03:56 +0530
- Subject: [ECOS] additional compiler options in cdl script
I have some questions with following sample cdl script
cdl_package CYGPKG_MY_PKG {
compile a.c b.c c.c
cdl_component CYGPKG_MY_PKG_OPTIONS {
cdl_option CYGPKG_MY_PKG_CFLAGS_ADD {
default_value { "-D_KERNEL "}
}
}
cdl_component CYGPKG_MY_PKG_MODULE {
active_if CYGPKG_MY_PKG
compile x.c y.c z.c
}
}
I am adding new package MY_PKG to eCos. MY_PKG_MODULE is an optional part of
this package, which is compiled only if user selects MY_PKG_MODULE. I want
files a.c, b.c and c.c to compile with compiler flag -D_KERNEL, if
MY_PKG_MODULE is not selected. But I want file a.c, b.c and c.c to compile
with compiler flags -D_KERNEL and -DMODULE_FLAG both, if user selects
MY_PKG_MODULE. I did try to put a CYGPKG_MY_PKG_MODULE_OPTIONS (like
CYGPKG_MY_PKG_OPTIONS) inside CYGPKG_MY_PKG_MODULE block and I was able to
see flags in configtool also but these flags are not used while compiling.
Can somebody explain, how to enable additional compiler options, if
MY_PKG_MODULE is selected.
Regards
Mohanlal
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss