ia64/xen-unstable

view tools/firmware/hvmloader/acpi/Makefile @ 12651:9164f836943d

[HVMLOADER] Fix CFLAGS.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Nov 29 11:38:17 2006 +0000 (2006-11-29)
parents 514ed4f0e5da
children 63fb88610e1e
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 override XEN_TARGET_ARCH = x86_32
19 XEN_ROOT = ../../../..
20 CFLAGS := -I. -I.. -I$(XEN_ROOT)/tools/libxc
21 include $(XEN_ROOT)/tools/Rules.mk
23 C_SRC = build.c dsdt.c static_tables.c
24 H_SRC = $(wildcard *.h)
25 OBJS = $(patsubst %.c,%.o,$(C_SRC))
27 IASL_VER = acpica-unix-20050513
28 IASL_URL = http://developer.intel.com/technology/iapc/acpi/downloads/$(IASL_VER).tar.gz
30 # Disable PIE/SSP if GCC supports them. They can break us.
31 CFLAGS += $(call cc-option,$(CC),-nopie,)
32 CFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
33 CFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
35 CFLAGS += -fno-builtin -O2 -msoft-float
37 vpath iasl $(PATH)
38 all: acpi.a
40 ssdt_tpm.h: ssdt_tpm.asl
41 $(MAKE) iasl
42 iasl -tc ssdt_tpm.asl
43 mv ssdt_tpm.hex ssdt_tpm.h
44 rm -f *.aml
46 dsdt.c: dsdt.asl
47 $(MAKE) iasl
48 iasl -tc dsdt.asl
49 mv dsdt.hex dsdt.c
50 echo "int DsdtLen=sizeof(AmlCode);" >> dsdt.c
51 rm -f *.aml
53 iasl:
54 @echo
55 @echo "ACPI ASL compiler(iasl) is needed"
56 @echo "Download Intel ACPI CA"
57 @echo "If wget failed, please download and compile manually from"
58 @echo "http://developer.intel.com/technology/iapc/acpi/downloads.htm"
59 @echo
60 wget $(IASL_URL)
61 tar xzf $(IASL_VER).tar.gz
62 make -C $(IASL_VER)/compiler
63 $(INSTALL_PROG) $(IASL_VER)/compiler/iasl /usr/bin/iasl
65 acpi.a: $(OBJS)
66 $(AR) rc $@ $(OBJS)
68 %.o: %.c $(H_SRC)
69 $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
71 clean:
72 rm -rf *.a *.o $(IASL_VER) $(IASL_VER).tar.gz
74 install: all