Add acpi_sony module for Sony laptops.
[dragonfly.git] / sys / dev / acpica5 / Makefile
CommitLineData
5ed44076 1# $FreeBSD: src/sys/modules/acpi/acpi/Makefile,v 1.3 2004/01/08 16:38:32 njl Exp $
745566f2 2# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.23 2008/08/28 09:25:42 hasso Exp $
e1eeedd0
YT
3
4CONTRIBDIR= ${SYSDIR}/${ACPICA_DIR}
67b2a2c8
YT
5
6SYSDIR?= ${.CURDIR}/../..
ebfbd8eb 7.if ACPI_DEBUG_LOCKS || ACPI_DEBUG_MEMMAP || ACPI_DEBUG_CACHE
e1eeedd0
YT
8CFLAGS+= -I${.OBJDIR}/include
9.if ACPI_DEBUG_LOCKS
10CFLAGS+= -DACPI_DEBUG_LOCKS=1
11.endif
12.if ACPI_DEBUG_MEMMAP
13CFLAGS+= -DACPI_DEBUG_MEMMAP=1
14.endif
ebfbd8eb
YT
15.if ACPI_DEBUG_CACHE
16CFLAGS+= -DACPI_DEBUG_CACHE=1
17.endif
e1eeedd0
YT
18.endif
19
67b2a2c8
YT
20.include "Makefile.inc"
21
e1eeedd0
YT
22.PATH: ${.OBJDIR} \
23 ${.OBJDIR}/include \
24 ${SYSDIR}/${OSACPI_MD_DIR} \
0955fd91 25 ${SYSDIR}/platform/${MACHINE_PLATFORM}/isa \
f6571408
YT
26 ${SYSDIR}/bus/pci \
27 ${.CURDIR}/Osd \
28 ${.CURDIR} \
29 ${ACPICA_KERN_PATHS}
5ed44076
MD
30
31KMOD = acpi
32
33# ACPI CA sources
5ed44076
MD
34SRCS+= dsfield.c dsinit.c dsmethod.c dsmthdat.c
35SRCS+= dsobject.c dsopcode.c dsutils.c dswexec.c dswload.c
36SRCS+= dswscope.c dswstate.c evevent.c evgpe.c evgpeblk.c
37SRCS+= evmisc.c evregion.c evrgnini.c evsci.c evxface.c
38SRCS+= evxfevnt.c evxfregn.c exconfig.c exconvrt.c excreate.c
39SRCS+= exdump.c exfield.c exfldio.c exmisc.c exmutex.c
40SRCS+= exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c
41SRCS+= exprep.c exregion.c exresnte.c exresolv.c exresop.c
42SRCS+= exstore.c exstoren.c exstorob.c exsystem.c exutils.c
da42c799 43SRCS+= hwacpi.c hwgpe.c hwregs.c hwsleep.c hwtimer.c hwvalid.c hwxface.c
5ed44076 44SRCS+= nsaccess.c nsalloc.c nsdump.c nseval.c nsinit.c
da42c799 45SRCS+= nsload.c nsnames.c nsobject.c nsparse.c nssearch.c nspredef.c
5ed44076 46SRCS+= nsutils.c nswalk.c nsxfeval.c nsxfname.c nsxfobj.c
e1eeedd0 47SRCS+= psargs.c psloop.c psopcode.c psparse.c psscope.c
5ed44076 48SRCS+= pstree.c psutils.c pswalk.c psxface.c
e1eeedd0 49SRCS+= rsaddr.c rscalc.c rscreate.c rsdump.c rsinfo.c rsio.c
5ed44076 50SRCS+= rsirq.c rslist.c rsmemory.c rsmisc.c rsutils.c
e1eeedd0
YT
51SRCS+= rsxface.c tbfadt.c tbfind.c tbinstal.c
52SRCS+= tbutils.c tbxface.c tbxfroot.c utalloc.c
da42c799 53SRCS+= utclib.c utcopy.c utdebug.c utdelete.c uteval.c utlock.c
e1eeedd0
YT
54SRCS+= utglobal.c utinit.c utmath.c utmisc.c utmutex.c utobject.c
55SRCS+= utresrc.c utstate.c utxface.c
5ed44076
MD
56
57# OSD layer
58#
cc6e2b6e 59SRCS+= acpi.c acpi_acad.c acpi_battery.c acpi_button.c acpi_cmbat.c
c3a2c0df 60SRCS+= acpi_cpu.c acpi_cpu_cstate.c acpi_cpu_pstate.c
5ed44076 61SRCS+= acpi_ec.c acpi_isab.c acpi_lid.c
e34b79bf
JS
62SRCS+= acpi_package.c
63# The PCI part of ACPI5 doesn't work with the current infrastructure
e20af2f4
AP
64SRCS+= acpi_pci.c acpi_pcib.c acpi_pcib_acpi.c acpi_pcib_pci.c
65SRCS+= acpi_pci_link.c
e34b79bf 66SRCS+= acpi_powerres.c acpi_resource.c acpi_thermal.c
bea6e278 67SRCS+= acpi_timer.c acpi_hpet.c acpi_if.c
5ed44076 68SRCS+= OsdDebug.c
e1eeedd0 69SRCS+= OsdHardware.c OsdInterface.c OsdInterrupt.c OsdMemory.c OsdSchedule.c
5ed44076
MD
70SRCS+= OsdStream.c OsdSynch.c OsdTable.c OsdEnvironment.c
71SRCS+= opt_acpi.h opt_bus.h opt_ddb.h
ae64441b 72SRCS+= device_if.h bus_if.h pci_if.h pcib_if.h isa_if.h acpi_if.h acpi_wmi_if.h
676159d4 73MFILES = kern/device_if.m kern/bus_if.m bus/pci/pci_if.m bus/pci/pcib_if.m
ae64441b 74MFILES+= bus/isa/isa_if.m dev/acpica5/acpi_if.m dev/acpica5/acpi_wmi_if.m
5ed44076
MD
75
76# Debugging support
77DBSRC= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c
78DBSRC+= dbinput.c dbstats.c dbutils.c dbxface.c
79DBSRC+= dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c
80DBSRC+= dmresrcs.c dmutils.c dmwalk.c
81
5ed44076
MD
82.if ACPI_NO_SEMAPHORES
83CFLAGS+=-DACPI_NO_SEMAPHORES
84.endif
85.if ACPI_DEBUG
86CFLAGS+=-DACPI_DEBUG
87SRCS+= ${DBSRC}
88opt_ddb.h: Makefile
89 echo "#define DDB 1" > ${.TARGET}
90.else
91opt_ddb.h: Makefile
92 echo -n > ${.TARGET}
93.endif
e1eeedd0
YT
94.if ACPI_USE_LOCAL_CACHE
95CFLAGS+= -DACPI_USE_LOCAL_CACHE
96SRCS+= utcache.c
97.else
98SRCS+= OsdCache.c
99.endif
5ed44076 100
7b46b972
SZ
101# Machine-specific code for P-State
102SRCS+= acpi_pstate_machdep.c
5ed44076 103# Machine-specific code such as sleep/wakeup
e774ca6d 104SRCS+= acpi_machdep.c acpi_wakecode.h
01082ef8 105SRCS+= acpi_wakeup.c
e774ca6d 106.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
99e3d339
MD
107# APIC enumerators
108#SRCS+= madt.c
109SRCS+= pmtimer.c
49e48b8a 110.endif
5ed44076
MD
111CLEANFILES+= acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin ${DBSRC}
112CLEANFILES+= platform/acenv.h
113
114acpi_wakecode.h: acpi_wakecode.S
f6571408
YT
115 ${MAKE} -f ${SYSDIR}/${OSACPI_MD_DIR}/Makefile \
116 MAKESRCPATH=${SYSDIR}/${OSACPI_MD_DIR}
5ed44076 117
f3c2120e 118SUBDIR= acpi_asus acpi_fujitsu acpi_hp acpi_panasonic acpi_sony acpi_thinkpad acpi_toshiba acpi_video aibs
f9d8cd12 119all: ${PROG} ${SUBDIR}
5ed44076 120
c34dd8ac 121.include <bsd.kmod.mk>