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