#
# Makefile for the Linux ACPI interpreter
# 

O_TARGET := acpi.o

export ACPI_CFLAGS

ACPI_CFLAGS := -D_LINUX -I$(CURDIR)/include

#
# ACPI Boot-Time Table Parsing
#
ifeq ($(CONFIG_ACPI_BOOT),y)
  obj-y		+= acpi_tables.o
endif

#
# ACPI Interpreter (Core), Bus, and Device Drivers
#
ifeq ($(CONFIG_ACPI_INTERPRETER),y)

  export-objs 	:= acpi_ksyms.o

  acpi-subdirs 	:= utilities dispatcher events hardware \
		   executer namespace parser resources tables

  subdir-y 	+= $(acpi-subdirs)
  subdir-y	+= ospm
  subdir-m	+= ospm

  ifdef CONFIG_ACPI_DEBUG
    ACPI_CFLAGS += -DACPI_DEBUG -Wno-unused
  endif

  ifdef CONFIG_ACPI_DEBUGGER
    ACPI_CFLAGS	+= -DENABLE_DEBUGGER
    acpi-subdirs += debugger
  endif

  EXTRA_CFLAGS	+= $(ACPI_CFLAGS)

  obj-y 	+= acpi_driver.o acpi_osl.o acpi_ksyms.o
  obj-$(CONFIG_ACPI_PCI) += acpi_pci.o
  obj-y 	+= $(foreach dir,$(subdir-y),$(dir)/$(dir).o)

  # commented out until we distribute it -ASG
  #ifeq ($(CONFIG_KDB),y)
  #  obj-m	+= kdb/kdbm_acpi.o
  #endif

endif

include $(TOPDIR)/Rules.make
