This is the mail archive of the
ecos-devel@sources.redhat.com
mailing list for the eCos project.
Conditional compilation
- From: Gary Thomas <gary at mlbassoc dot com>
- To: eCos development <ecos-devel at ecos dot sourceware dot org>
- Date: 20 Oct 2003 06:10:07 -0600
- Subject: Conditional compilation
- Organization: MLB Associates
I have a device which can be configured one of two ways. I need a
separate driver file (this is for MicroWindows, trying to decide
between a mouse and a touch screen). Is there a better way to handle
this than how I've done it?
cdl_component CYGBLD_MICROWINDOWS_PROT732_MOUSE_DRIVER {
display "Mouse selection"
legal_values { "pc" "ms" "logi" "ps2" "ts" }
default_value { "logi" }
cdl_option CYGBLD_MICROWINDOWS_PROT732_MOUSE_DRIVER_MOUSE {
description "Use mouse on PS/2 port"
calculated { CYGBLD_MICROWINDOWS_PROT732_MOUSE_DRIVER != "ts" }
no_define
compile drivers/mou_ser.c
}
cdl_option CYGBLD_MICROWINDOWS_PROT732_MOUSE_DRIVER_TOUCH {
description "Use touch screen for mouse"
calculated { CYGBLD_MICROWINDOWS_PROT732_MOUSE_DRIVER == "ts" }
no_define
compile drivers/mou_prot732ts.c
}
}
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates