3 .if ${MACHINE} != "i386"
4 .error "The ACPI module is only for i386"
8 .PATH: ${.CURDIR}/../../../contrib/dev/acpica \
9 ${.CURDIR}/../../../pci \
10 ${.CURDIR}/../../../dev/acpica \
11 ${.CURDIR}/../../../dev/acpica/Osd \
12 ${.CURDIR}/../../../${MACHINE_ARCH}/acpica
17 CFLAGS+= -I${.CURDIR}/../../../contrib/dev/acpica
18 SRCS+= dsfield.c dsinit.c dsmethod.c dsmthdat.c
19 SRCS+= dsobject.c dsopcode.c dsutils.c dswexec.c dswload.c
20 SRCS+= dswscope.c dswstate.c evevent.c evgpe.c evgpeblk.c
21 SRCS+= evmisc.c evregion.c evrgnini.c evsci.c evxface.c
22 SRCS+= evxfevnt.c evxfregn.c exconfig.c exconvrt.c excreate.c
23 SRCS+= exdump.c exfield.c exfldio.c exmisc.c exmutex.c
24 SRCS+= exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c
25 SRCS+= exprep.c exregion.c exresnte.c exresolv.c exresop.c
26 SRCS+= exstore.c exstoren.c exstorob.c exsystem.c exutils.c
27 SRCS+= hwacpi.c hwgpe.c hwregs.c hwsleep.c hwtimer.c
28 SRCS+= nsaccess.c nsalloc.c nsdump.c nseval.c nsinit.c
29 SRCS+= nsload.c nsnames.c nsobject.c nsparse.c nssearch.c
30 SRCS+= nsutils.c nswalk.c nsxfeval.c nsxfname.c nsxfobj.c
31 SRCS+= psargs.c psloop.c psopcode.c psparse.c psscope.c
32 SRCS+= pstree.c psutils.c pswalk.c psxface.c
33 SRCS+= rsaddr.c rscalc.c rscreate.c rsdump.c rsinfo.c rsio.c
34 SRCS+= rsirq.c rslist.c rsmemory.c rsmisc.c rsutils.c
35 SRCS+= rsxface.c tbconvrt.c tbget.c tbgetall.c tbinstal.c
36 SRCS+= tbrsdt.c tbutils.c tbxface.c tbxfroot.c utalloc.c
37 SRCS+= utcache.c utclib.c utcopy.c utdebug.c utdelete.c
38 SRCS+= uteval.c utglobal.c utinit.c utmath.c utmisc.c
39 SRCS+= utmutex.c utobject.c utstate.c utxface.c
41 # OSPM layer and core hardware drivers
42 SRCS+= acpi.c acpi_button.c acpi_isab.c
43 SRCS+= acpi_package.c acpi_pci.c acpi_pcib.c acpi_pcib_acpi.c
44 SRCS+= acpi_pcib_pci.c acpi_powerres.c acpi_quirk.c acpi_resource.c
45 SRCS+= acpi_timer.c acpi_pci_link.c acpi_thermal.c
47 # ACPI hardware drivers, mostly used for mobile systems.
48 SRCS+= acpi_acad.c acpi_battery.c acpi_cmbat.c acpi_cpu.c
49 SRCS+= acpi_ec.c acpi_hpet.c acpi_lid.c acpi_perf.c acpi_smbat.c
50 SRCS+= acpi_throttle.c
54 SRCS+= OsdHardware.c OsdInterrupt.c OsdMemory.c OsdSchedule.c
55 SRCS+= OsdStream.c OsdSynch.c OsdTable.c OsdEnvironment.c
56 SRCS+= opt_acpi.h opt_bus.h opt_ddb.h
57 SRCS+= acpi_if.h acpi_quirks.h bus_if.h cpufreq_if.h device_if.h
58 SRCS+= isa_if.h pci_if.h pcib_if.h
60 # XXX ACPI should not depend on the following headers but this is currently
61 # needed for the build of assym.s.
62 # This obviously needs a better and more structural fix.
63 SRCS+= opt_kstack_pages.h opt_nfs.h opt_apic.h opt_compat.h
66 DBSRC= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c
67 DBSRC+= dbinput.c dbstats.c dbutils.c dbxface.c
68 DBSRC+= dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c
69 DBSRC+= dmresrcs.c dmutils.c dmwalk.c
71 CFLAGS+=-DACPI_USE_LOCAL_CACHE
72 .if !defined(KERNBUILDDIR)
74 CFLAGS+=-DACPI_MAX_THREADS=${ACPI_MAX_THREADS}
76 .if ACPI_NO_SEMAPHORES
77 CFLAGS+=-DACPI_NO_SEMAPHORES
83 echo "#define DDB 1" > ${.TARGET}
90 # Machine-specific code such as sleep/wakeup
91 SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c
92 .if ${MACHINE} == "i386"
95 CLEANFILES+= acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin ${DBSRC:.c=.o}
97 acpi_wakecode.h: acpi_wakecode.S assym.s
98 ${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \
99 MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica
101 .include <bsd.kmod.mk>