This is the mail archive of the ecos-devel@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Conditional compilation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]