aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/acpica/Makefile
blob: 743728051e974502b5930023d81ea1c5e8c41d9d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# $FreeBSD$

# Correct path for kernel builds
# Don't rely on the kernel's .depend file
.ifdef MAKESRCPATH
.PATH: ${MAKESRCPATH}
DEPENDFILE=
.else
MAKESRCPATH= ${.CURDIR}
CLEANFILES= acpi_wakecode.h acpi_wakedata.h acpi_wakecode.bin acpi_wakecode.o
.endif
.if ${CC} == "icc"
CFLAGS+=	-restrict
NOSTDINC=	-X
.else
NOSTDINC=	-nostdinc
.endif
CFLAGS+=	${NOSTDINC} -include opt_global.h -I. -I${MAKESRCPATH}/../..

all: acpi_wakecode.h acpi_wakedata.h

acpi_wakecode.o: acpi_wakecode.S assym.s

acpi_wakecode.bin: acpi_wakecode.o
	objcopy -S -O binary acpi_wakecode.o acpi_wakecode.bin

acpi_wakecode.h: acpi_wakecode.bin
	sh ${MAKESRCPATH}/genwakecode.sh > acpi_wakecode.h

acpi_wakedata.h: acpi_wakecode.bin
	sh ${MAKESRCPATH}/genwakedata.sh > acpi_wakedata.h

.include <bsd.prog.mk>