debuggers.hg

view tools/firmware/hvmloader/acpi/Makefile @ 22906:700ac6445812

Now add KDB to the non-kdb tree
author Mukesh Rathor
date Thu Feb 03 15:42:41 2011 -0800 (2011-02-03)
parents 2e8bdff60d01
children
line source
1 #
2 # Copyright (c) 2004, Intel Corporation.
3 #
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms and conditions of the GNU General Public License,
6 # version 2, as published by the Free Software Foundation.
7 #
8 # This program is distributed in the hope it will be useful, but WITHOUT
9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 # more details.
12 #
13 # You should have received a copy of the GNU General Public License along with
14 # this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15 # Place - Suite 330, Boston, MA 02111-1307 USA.
16 #
18 XEN_ROOT = ../../../..
19 include $(XEN_ROOT)/tools/firmware/Rules.mk
21 C_SRC = build.c dsdt_anycpu.c dsdt_15cpu.c static_tables.c
22 OBJS = $(patsubst %.c,%.o,$(C_SRC))
24 CFLAGS += -I. -I.. $(CFLAGS_include)
26 vpath iasl $(PATH)
27 all: acpi.a
29 ssdt_pm.h ssdt_tpm.h: %.h: %.asl iasl
30 iasl -vs -p $* -tc $<
31 sed -e 's/AmlCode/$*/g' $*.hex >$@
32 rm -f $*.hex $*.aml
34 # NB. awk invocation is a portable alternative to 'head -n -1'
35 dsdt_15cpu.c dsdt_anycpu.c: %.c: dsdt.asl mk_dsdt.c iasl
36 $(HOSTCC) $(HOSTCFLAGS) $(CFLAGS_include) -o mk_$* mk_dsdt.c
37 awk 'NR > 1 {print s} {s=$$0}' $< >$*.asl
38 ./mk_$* >>$*.asl
39 iasl -vs -p $* -tc $*.asl
40 sed -e 's/AmlCode/$*/g' $*.hex >$@
41 echo "int $*_len=sizeof($*);" >>$@
42 rm -f $*.hex $*.aml $*.asl mk_$*
44 iasl:
45 @echo
46 @echo "ACPI ASL compiler (iasl) is needed"
47 @echo "Download and install Intel ACPI CA from"
48 @echo "http://acpica.org/downloads/"
49 @echo
50 @exit 1
52 build.o: ssdt_pm.h ssdt_tpm.h
54 acpi.a: $(OBJS)
55 $(AR) rc $@ $(OBJS)
57 clean:
58 rm -rf *.a *.o $(IASL_VER) $(IASL_VER).tar.gz $(DEPS)
59 rm -rf ssdt_*.h dsdt*.c *~ *.aml *.hex mk_dsdt mk_dsdt15 dsdt_*cpu.asl
61 install: all
63 -include $(DEPS)