How to add '-Dxxx' flags in Makefile?

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

 



My makefile of `kpd.ko` is following:
============================
module_name = kpd
src_sym = kpd_main a38_kpd util
objs = $(addsuffix .o,$(src_sym))
wd = $(shell pwd)

EXTRA_CFLAGS+=-DTEST
ifneq ($(KERNELRELEASE),)

obj-m := $(module_name).o
$(module_name)-objs := $(objs)

else

kver = $(shell uname -r)
kd = ../../linux-2.6.32.8
modules:
$(MAKE) -C $(kd) M=$(wd) $@

clean:
$(MAKE) -C $(kd) M=$(wd) $@

endif
=============================
Everything's fine,but I want to add `-DTEST` to EXTRA_CFLAGS.
Even if I put $(EXTRA_FLAGS) or other macro into `$(MAKE) -C $(kd) M=$(wd) $@`,
Nothing changed in all building process.

How should I do to insert `-Dxxx` to original Makefile ?
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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