On Sat, Dec 08, 2007 at 12:09:21PM +0530, Amogh Hooshdar wrote:
> I found two types of Makefiles in some tutorials.
> 
> One was like this:-
> 
> obj-m := hello-1.o
> 
> Other was like this:-
> 
> obj-m += hello-1.o
> 
> Both generated .ko files properly and I could insmod and rmmod the ko
> successfully. Please explain what is the difference between := and +=
> ?

+= adds the module to obj-m while := sets the modules to only this 
module.

  obj-m := hello-1.o
  obj-m := hello-2.o

builds only hello-2


  obj-m += hello-1.o
  obj-m += hello-2.o

builds both


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to