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