Kbuild 799 B

1234567891011121314151617181920
  1. obj-$(DAHDI_BUILD_ALL)$(CONFIG_DAHDI_OPVXA1200) += opvxa1200.o
  2. EXTRA_CFLAGS += -I$(src)/.. -Wno-undef
  3. opvxa1200-objs := base.o
  4. DAHDI_KERNEL_H_NAME:=kernel.h
  5. DAHDI_KERNEL_H_PATH:=$(DAHDI_INCLUDE)/dahdi/$(DAHDI_KERNEL_H_NAME)
  6. ifneq ($(DAHDI_KERNEL_H_PATH),)
  7. DAHDI_SPAN_MODULE:=$(shell if grep -C 5 "struct dahdi_span {" $(DAHDI_KERNEL_H_PATH) | grep -q "struct module \*owner"; then echo "yes"; else echo "no"; fi)
  8. DAHDI_SPAN_OPS:=$(shell if grep -q "struct dahdi_span_ops {" $(DAHDI_KERNEL_H_PATH); then echo "yes"; else echo "no"; fi)
  9. ifeq ($(DAHDI_SPAN_MODULE),yes)
  10. EXTRA_CFLAGS+=-DDAHDI_SPAN_MODULE
  11. else
  12. ifeq ($(DAHDI_SPAN_OPS),yes)
  13. EXTRA_CFLAGS+=-DDAHDI_SPAN_OPS
  14. endif
  15. endif
  16. endif