source: trunk/packages/xen-common/xen-common/tools/firmware/hvmloader/acpi/Makefile @ 34

Last change on this file since 34 was 34, checked in by hartmans, 17 years ago

Add xen and xen-common

File size: 2.1 KB
Line 
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#
17
18override XEN_TARGET_ARCH = x86_32
19XEN_ROOT = ../../../..
20CFLAGS := -I. -I.. -I$(XEN_ROOT)/tools/libxc
21include $(XEN_ROOT)/tools/Rules.mk
22
23C_SRC = build.c dsdt.c static_tables.c
24H_SRC = $(wildcard *.h)
25OBJS  = $(patsubst %.c,%.o,$(C_SRC))
26
27IASL_VER = acpica-unix-20060707
28IASL_URL = http://developer.intel.com/technology/iapc/acpi/downloads/$(IASL_VER).tar.gz
29
30# Disable PIE/SSP if GCC supports them. They can break us.
31CFLAGS  += $(call cc-option,$(CC),-nopie,)
32CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector,)
33CFLAGS  += $(call cc-option,$(CC),-fno-stack-protector-all,)
34
35CFLAGS  += -fno-builtin -O2 -msoft-float
36
37vpath iasl $(PATH)
38all: acpi.a
39
40ssdt_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
45
46dsdt.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
52
53iasl:
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
64
65acpi.a: $(OBJS)
66        $(AR) rc $@ $(OBJS)
67
68%.o: %.c $(H_SRC)
69        $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
70
71clean:
72        rm -rf *.a *.o $(IASL_VER) $(IASL_VER).tar.gz
73
74install: all
Note: See TracBrowser for help on using the repository browser.