Bring in YONETANI Tomokazu's acpi-update-2.patch (27-May-2004), a major
[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 $
f9d8cd12 2# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.2 2004/06/27 08:52:39 dillon Exp $
5ed44076 3
f9d8cd12 4.include "Makefile.inc"
5ed44076
MD
5
6.PATH: ${.CURDIR}/../../${MACHINE_ARCH}/acpica5 \
7 ${.CURDIR}/../../bus/pci \
8 ${.CURDIR}/Osd \
9 ${.CURDIR} \
10 ${.CURDIR}/../../${SYSACPICA}/interpreter/dispatcher \
11 ${.CURDIR}/../../${SYSACPICA}/interpreter/executer \
12 ${.CURDIR}/../../${SYSACPICA}/interpreter/parser \
13 ${.CURDIR}/../../${SYSACPICA}/events \
14 ${.CURDIR}/../../${SYSACPICA}/hardware \
15 ${.CURDIR}/../../${SYSACPICA}/namespace \
16 ${.CURDIR}/../../${SYSACPICA}/resources \
17 ${.CURDIR}/../../${SYSACPICA}/tables \
18 ${.CURDIR}/../../${SYSACPICA}/utilities \
19
20KMOD = acpi
21
22# ACPI CA sources
23CFLAGS+= -I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../../${SYSACPICA}/include
24SRCS+= dsfield.c dsinit.c dsmethod.c dsmthdat.c
25SRCS+= dsobject.c dsopcode.c dsutils.c dswexec.c dswload.c
26SRCS+= dswscope.c dswstate.c evevent.c evgpe.c evgpeblk.c
27SRCS+= evmisc.c evregion.c evrgnini.c evsci.c evxface.c
28SRCS+= evxfevnt.c evxfregn.c exconfig.c exconvrt.c excreate.c
29SRCS+= exdump.c exfield.c exfldio.c exmisc.c exmutex.c
30SRCS+= exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c
31SRCS+= exprep.c exregion.c exresnte.c exresolv.c exresop.c
32SRCS+= exstore.c exstoren.c exstorob.c exsystem.c exutils.c
33SRCS+= hwacpi.c hwgpe.c hwregs.c hwsleep.c hwtimer.c
34SRCS+= nsaccess.c nsalloc.c nsdump.c nseval.c nsinit.c
35SRCS+= nsload.c nsnames.c nsobject.c nsparse.c nssearch.c
36SRCS+= nsutils.c nswalk.c nsxfeval.c nsxfname.c nsxfobj.c
37SRCS+= psargs.c psopcode.c psparse.c psscope.c
38SRCS+= pstree.c psutils.c pswalk.c psxface.c
39SRCS+= rsaddr.c rscalc.c rscreate.c rsdump.c rsio.c
40SRCS+= rsirq.c rslist.c rsmemory.c rsmisc.c rsutils.c
41SRCS+= rsxface.c tbconvrt.c tbget.c tbgetall.c tbinstal.c
42SRCS+= tbrsdt.c tbutils.c tbxface.c tbxfroot.c utalloc.c
43SRCS+= utclib.c utcopy.c utdebug.c utdelete.c uteval.c
44SRCS+= utglobal.c utinit.c utmath.c utmisc.c utobject.c
45SRCS+= utxface.c
46
47# OSD layer
48#
49SRCS+= acpi.c acpi_acad.c acpi_battery.c acpi_button.c acpi_cmbat.c acpi_cpu.c
50SRCS+= acpi_ec.c acpi_isab.c acpi_lid.c
51SRCS+= acpi_package.c acpi_pci.c acpi_pcib.c acpi_pcib_acpi.c
52SRCS+= acpi_pcib_pci.c acpi_powerres.c acpi_resource.c acpi_thermal.c
53SRCS+= acpi_timer.c acpi_pci_link.c
54SRCS+= OsdDebug.c
55SRCS+= OsdHardware.c OsdInterrupt.c OsdMemory.c OsdSchedule.c
56SRCS+= OsdStream.c OsdSynch.c OsdTable.c OsdEnvironment.c
57SRCS+= opt_acpi.h opt_bus.h opt_ddb.h
58SRCS+= device_if.h bus_if.h pci_if.h pcib_if.h isa_if.h
59
60# Debugging support
61DBSRC= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c
62DBSRC+= dbinput.c dbstats.c dbutils.c dbxface.c
63DBSRC+= dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c
64DBSRC+= dmresrcs.c dmutils.c dmwalk.c
65
66.if ACPI_MAX_THREADS
67CFLAGS+=-DACPI_MAX_THREADS=${ACPI_MAX_THREADS}
68.endif
69.if ACPI_NO_SEMAPHORES
70CFLAGS+=-DACPI_NO_SEMAPHORES
71.endif
72.if ACPI_DEBUG
73CFLAGS+=-DACPI_DEBUG
74SRCS+= ${DBSRC}
75opt_ddb.h: Makefile
76 echo "#define DDB 1" > ${.TARGET}
77.else
78opt_ddb.h: Makefile
79 echo -n > ${.TARGET}
80.endif
81
82# Machine-specific code such as sleep/wakeup
83SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c
f9d8cd12
MD
84#.if ${MACHINE} == "i386"
85#SRCS+= madt.c
86#.endif
5ed44076
MD
87CLEANFILES+= acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin ${DBSRC}
88CLEANFILES+= platform/acenv.h
89
90acpi_wakecode.h: acpi_wakecode.S
91 ${MAKE} -f ${.CURDIR}/../../${MACHINE_ARCH}/acpica5/Makefile \
92 MAKESRCPATH=${.CURDIR}/../../${MACHINE_ARCH}/acpica5
93
94# acpi.h includes "platform/acenv.h". This is the easiest way to create
95# a modified acenv.h
96#
97${.OBJDIR}/acpi.h: ${.CURDIR}/../../${SYSACPICA}/include/acpi.h
98 cp ${.ALLSRC} ${.TARGET}
99
100${.OBJDIR}/platform/acenv.h: ${.CURDIR}/../../${SYSACPICA}/include/platform/acenv.h
101 if [ ! -d ${.OBJDIR}/platform ]; then mkdir ${.OBJDIR}/platform; fi
102 cat ${.ALLSRC} | \
103 sed -e 's/__FreeBSD__/__DragonFly__/' | \
104 sed -e 's/acfreebsd.h/acdragonfly.h/' > ${.TARGET}.new
105 mv -f ${.TARGET}.new ${.TARGET}
106
107SRCS+= ${.OBJDIR}/acpi.h ${.OBJDIR}/platform/acenv.h
108
f9d8cd12
MD
109SUBDIR= acpi_toshiba
110all: ${PROG} ${SUBDIR}
5ed44076 111
f9d8cd12
MD
112.include <bsd.kmod.mk>
113.include <bsd.subdir.mk>