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