[haiku-development] Re: ipro1000 (e1000) are now 3 drivers in freebsd

  • From: "Ingo Weinhold" <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 13 Jun 2011 00:46:24 +0200

Fredrik Modèen wrote:
> How would we handle that?
> 
> I would like to do something like this. I don't know JAM but something
> like this should be possible?
> 
> DRIVERS = em lem igb ;
> 
> for dev in $(DRIVERS) {
> KernelAddon $(dev) :
> e1000_80003es2lan.c
> e1000_82540.c
> e1000_82541.c
> e1000_82542.c
> e1000_82543.c
> e1000_82571.c
> e1000_82575.c
> e1000_api.c
> e1000_ich8lan.c
> e1000_mac.c
> e1000_manage.c
> e1000_mbx.c
> e1000_nvm.c
> e1000_osdep.c
> e1000_phy.c
> e1000_vf.c
> glue.c
> 
> switch $(dev)
> {
> case em : if_em.c ;
> case lem : if_lem.c ;
> case igb : if_igb.c ;
> }
> 
> : libfreebsd_network.a
> ;
> }

Unless there is a reason to build the same source file(s) for each driver, 
avoid that. E.g. just build a static library (StaticKernelLibrary) and link 
against it. If you really need to build one or more source files for each 
driver, create a subdirectory for each driver to avoid clashes.

CU, Ingo

Other related posts: