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 $
5 # XXX use /sys/dev/acpica5/Makefile.inc
6 SYSDIR?= ${.CURDIR}/../../../sys
7 OSACPI_DIR= ${SYSDIR}/dev/acpica5
8 .include "${OSACPI_DIR}/Makefile.inc"
9 ACPICA_DIR?= ${SYSDIR}/${SYSACPICA}
11 CFLAGS+= -I${.OBJDIR} \
14 -I${ACPICA_DIR}/include \
15 -I${ACPICA_DIR}/compiler
17 .if exists(${.CURDIR}/../../Makefile.inc)
18 .include "${.CURDIR}/../../Makefile.inc"
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 \
45 # acpi.h includes "platform/acenv.h". This is the easiest way to create
48 ${.OBJDIR}/acpi.h: ${ACPICA_DIR}/include/acpi.h
49 cp ${.ALLSRC} ${.TARGET}
51 ${.OBJDIR}/platform/acenv.h: ${ACPICA_DIR}/include/platform/acenv.h
52 if [ ! -d ${.OBJDIR}/platform ]; then mkdir ${.OBJDIR}/platform; fi
54 sed -e 's/__FreeBSD__/__DragonFly__/' | \
55 sed -e 's/acfreebsd.h/acdragonfly.h/' > ${.TARGET}.new
56 mv -f ${.TARGET}.new ${.TARGET}
58 SRCS+= ${.OBJDIR}/acpi.h ${.OBJDIR}/platform/acenv.h