Clean up ACPI build wrappers:
[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 $
f6571408 2# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.11 2006/06/14 15:50:09 y0netan1 Exp $
67b2a2c8
YT
3
4SYSDIR?= ${.CURDIR}/../..
5.include "Makefile.inc"
6
f6571408
YT
7.PATH: ${SYSDIR}/${OSACPI_MD_DIR} \
8 ${SYSDIR}/${MACHINE_ARCH}/isa \
9 ${SYSDIR}/bus/pci \
10 ${.CURDIR}/Osd \
11 ${.CURDIR} \
12 ${ACPICA_KERN_PATHS}
5ed44076
MD
13
14KMOD = acpi
15
16# ACPI CA sources
5ed44076
MD
17SRCS+= dsfield.c dsinit.c dsmethod.c dsmthdat.c
18SRCS+= dsobject.c dsopcode.c dsutils.c dswexec.c dswload.c
19SRCS+= dswscope.c dswstate.c evevent.c evgpe.c evgpeblk.c
20SRCS+= evmisc.c evregion.c evrgnini.c evsci.c evxface.c
21SRCS+= evxfevnt.c evxfregn.c exconfig.c exconvrt.c excreate.c
22SRCS+= exdump.c exfield.c exfldio.c exmisc.c exmutex.c
23SRCS+= exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c
24SRCS+= exprep.c exregion.c exresnte.c exresolv.c exresop.c
25SRCS+= exstore.c exstoren.c exstorob.c exsystem.c exutils.c
26SRCS+= hwacpi.c hwgpe.c hwregs.c hwsleep.c hwtimer.c
27SRCS+= nsaccess.c nsalloc.c nsdump.c nseval.c nsinit.c
28SRCS+= nsload.c nsnames.c nsobject.c nsparse.c nssearch.c
29SRCS+= nsutils.c nswalk.c nsxfeval.c nsxfname.c nsxfobj.c
30SRCS+= psargs.c psopcode.c psparse.c psscope.c
31SRCS+= pstree.c psutils.c pswalk.c psxface.c
32SRCS+= rsaddr.c rscalc.c rscreate.c rsdump.c rsio.c
33SRCS+= rsirq.c rslist.c rsmemory.c rsmisc.c rsutils.c
34SRCS+= rsxface.c tbconvrt.c tbget.c tbgetall.c tbinstal.c
35SRCS+= tbrsdt.c tbutils.c tbxface.c tbxfroot.c utalloc.c
36SRCS+= utclib.c utcopy.c utdebug.c utdelete.c uteval.c
37SRCS+= utglobal.c utinit.c utmath.c utmisc.c utobject.c
38SRCS+= utxface.c
39
40# OSD layer
41#
42SRCS+= acpi.c acpi_acad.c acpi_battery.c acpi_button.c acpi_cmbat.c acpi_cpu.c
43SRCS+= acpi_ec.c acpi_isab.c acpi_lid.c
e34b79bf
JS
44SRCS+= acpi_package.c
45# The PCI part of ACPI5 doesn't work with the current infrastructure
46# SRCS+= acpi_pci.c acpi_pcib.c acpi_pcib_acpi.c acpi_pcib_pci.c
47# SRCS+= acpi_pci_link.c
48SRCS+= acpi_powerres.c acpi_resource.c acpi_thermal.c
49SRCS+= acpi_timer.c
5ed44076
MD
50SRCS+= OsdDebug.c
51SRCS+= OsdHardware.c OsdInterrupt.c OsdMemory.c OsdSchedule.c
52SRCS+= OsdStream.c OsdSynch.c OsdTable.c OsdEnvironment.c
53SRCS+= opt_acpi.h opt_bus.h opt_ddb.h
54SRCS+= device_if.h bus_if.h pci_if.h pcib_if.h isa_if.h
55
56# Debugging support
57DBSRC= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c
58DBSRC+= dbinput.c dbstats.c dbutils.c dbxface.c
59DBSRC+= dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c
60DBSRC+= dmresrcs.c dmutils.c dmwalk.c
61
5ed44076
MD
62.if ACPI_NO_SEMAPHORES
63CFLAGS+=-DACPI_NO_SEMAPHORES
64.endif
65.if ACPI_DEBUG
66CFLAGS+=-DACPI_DEBUG
67SRCS+= ${DBSRC}
68opt_ddb.h: Makefile
69 echo "#define DDB 1" > ${.TARGET}
70.else
71opt_ddb.h: Makefile
72 echo -n > ${.TARGET}
73.endif
74
75# Machine-specific code such as sleep/wakeup
76SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c
49e48b8a 77.if ${MACHINE} == "i386"
99e3d339
MD
78# APIC enumerators
79#SRCS+= madt.c
80SRCS+= pmtimer.c
49e48b8a 81.endif
5ed44076
MD
82CLEANFILES+= acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin ${DBSRC}
83CLEANFILES+= platform/acenv.h
84
85acpi_wakecode.h: acpi_wakecode.S
f6571408
YT
86 ${MAKE} -f ${SYSDIR}/${OSACPI_MD_DIR}/Makefile \
87 MAKESRCPATH=${SYSDIR}/${OSACPI_MD_DIR}
5ed44076 88
f9d8cd12
MD
89SUBDIR= acpi_toshiba
90all: ${PROG} ${SUBDIR}
5ed44076 91
f9d8cd12 92.include <bsd.kmod.mk>