xref: /dragonfly/usr.sbin/acpi/Makefile.inc (revision 606a6e92)
1# $Id: Makefile.inc,v 1.1 2000/07/14 18:16:22 iwasaki Exp $
2# $FreeBSD: src/usr.sbin/acpi/Makefile.inc,v 1.8 2003/08/07 16:51:50 njl Exp $
3# $DragonFly: src/usr.sbin/acpi/Makefile.inc,v 1.1 2004/07/05 00:22:40 dillon Exp $
4
5# XXX use /sys/dev/acpica5/Makefile.inc
6SYSDIR?= ${.CURDIR}/../../../sys
7OSACPI_DIR= ${SYSDIR}/dev/acpica5
8.include "${OSACPI_DIR}/Makefile.inc"
9ACPICA_DIR?=	${SYSDIR}/${SYSACPICA}
10
11CFLAGS+= -I${.OBJDIR}		\
12	-I${SYSDIR}		\
13	-I${OSACPI_DIR}		\
14	-I${ACPICA_DIR}/include \
15	-I${ACPICA_DIR}/compiler
16
17.if exists(${.CURDIR}/../../Makefile.inc)
18.include "${.CURDIR}/../../Makefile.inc"
19.endif
20
21# XXX share this with /sys/dev/acpica5/Makefile.inc?
22.PATH:	${ACPICA_DIR}				\
23	${ACPICA_DIR}/compiler			\
24	${ACPICA_DIR}/common			\
25	${ACPICA_DIR}/debugger			\
26	${ACPICA_DIR}/disassembler		\
27	${ACPICA_DIR}/events			\
28	${ACPICA_DIR}/include			\
29	${ACPICA_DIR}/hardware			\
30	${ACPICA_DIR}/interpreter/dispatcher	\
31	${ACPICA_DIR}/interpreter/executer	\
32	${ACPICA_DIR}/interpreter/parser	\
33	${ACPICA_DIR}/namespace			\
34	${ACPICA_DIR}/resources			\
35	${ACPICA_DIR}/tables			\
36	${ACPICA_DIR}/utilities			\
37	${ACPICA_DIR}/EVENTS			\
38	${ACPICA_DIR}/HARDWARE			\
39	${ACPICA_DIR}/INTERPRETER/DISPATCHER	\
40	${ACPICA_DIR}/INTERPRETER/EXECUTER	\
41	${ACPICA_DIR}/INTERPRETER/PARSER	\
42	${ACPICA_DIR}/NAMESPACE			\
43	${ACPICA_DIR}/TABLES			\
44
45# acpi.h includes "platform/acenv.h".  This is the easiest way to create
46# a modified acenv.h
47#
48${.OBJDIR}/acpi.h: ${ACPICA_DIR}/include/acpi.h
49	cp ${.ALLSRC} ${.TARGET}
50
51${.OBJDIR}/platform/acenv.h: ${ACPICA_DIR}/include/platform/acenv.h
52	if [ ! -d ${.OBJDIR}/platform ]; then mkdir ${.OBJDIR}/platform; fi
53	cat ${.ALLSRC} | \
54	sed -e 's/__FreeBSD__/__DragonFly__/' | \
55	sed -e 's/acfreebsd.h/acdragonfly.h/' > ${.TARGET}.new
56	mv -f ${.TARGET}.new ${.TARGET}
57
58SRCS+= ${.OBJDIR}/acpi.h ${.OBJDIR}/platform/acenv.h
59