invoke form command line(makefile)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
    in my makefile i have written code for differnet testcases.i should give the macro from command line so that that piece of code should run
---------------------------------------------------------------------------------------------------------------------- DEBUG1 = -D_DTL_INIT_01
DEBUG2 = -D_DTL_INIT_02

ifdef DEBUG1
EXTRA_CFLAGS += -D_DTL_INIT_01
dtl_init_01-objs =  dtl_it_initiator.o Dummyfunctions.o
dtl_init_01_res-objs =  dtl_it_responder.o Dummyfunctions.o
obj-m += dtl_init_01.o
obj-m += dtl_init_01_res.o
endif

ifdef DEBUG2
EXTRA_CFLAGS+= -D_DTL_INIT_02
dtl_init_02-objs =  dtl_it_initiator.o Dummyfunctions.o
dtl_init_02_res-objs =  dtl_it_responder.o Dummyfunctions.o
obj-m += dtl_init_02.o
obj-m += dtl_init_02_res.o
endif

EXTRA_CFLAGS += -D__KERNEL__ -I$(PWD)/../../../SRC/include -I$(PWD)/../../../SRC/common/include -I$(PWD)/..


all:
   
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
   
clean:
    make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
    rm -f *Module.symvers
----------------------------------------------------------------------------------------------------------------------------
is there any method if i give -D_DTL_INIT_01 from commad line using make like make -D_DTL_INIT_01 the DEBUG1 code should run ,if i give -D_DTL_INIT_02
DEBUG2 should run

thanks,
hari

Send instant messages to your online friends http://uk.messenger.yahoo.com


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux