summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/Makefile
blob: e1e0745a4752ffba1fbb461faa38a943ebab1673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#
# Makefile for the Linux ACPI interpreter
#

O_TARGET := acpi.o

export-objs := acpi_ksyms.o

export ACPI_CFLAGS
ACPI_CFLAGS := -D_LINUX

#
# CONFIG_ACPI_KERNEL_CONFIG is currently only IA64
#
ifdef CONFIG_ACPI_KERNEL_CONFIG
  ACPI_CFLAGS += -DCONFIG_ACPI_KERNEL_CONFIG_ONLY
endif

EXTRA_CFLAGS += -I./include

EXTRA_CFLAGS += $(ACPI_CFLAGS)

# genksyms only reads $(CFLAGS), it should really read $(EXTRA_CFLAGS) as well.
# Without EXTRA_CFLAGS the gcc pass for genksyms fails, resulting in an empty
# include/linux/modules/acpi_ksyms.ver.  Changing genkyms to use EXTRA_CFLAGS
# will hit everything, too risky in 2.4.0-prerelease.  Bandaid by tweaking
# CFLAGS only for .ver targets.  Review after 2.4.0 release.  KAO

$(MODINCL)/%.ver: CFLAGS := -I./include $(CFLAGS)

acpi-subdirs := common dispatcher events hardware \
		interpreter namespace parser resources tables

subdir-$(CONFIG_ACPI) += $(acpi-subdirs)

obj-$(CONFIG_ACPI) := $(patsubst %,%.o,$(acpi-subdirs))
obj-$(CONFIG_ACPI) += os.o acpi_ksyms.o

ifdef CONFIG_ACPI_KERNEL_CONFIG
  obj-$(CONFIG_ACPI) += acpiconf.o osconf.o
else
  obj-$(CONFIG_ACPI) += driver.o cmbatt.o cpu.o ec.o acpi_ksyms.o sys.o table.o power.o
endif

include $(TOPDIR)/Rules.make

clean:
	$(RM) *.o */*.o