2009-04-22 20:48:38 +04:00
|
|
|
#
|
|
|
|
# Makefile.config
|
|
|
|
#
|
|
|
|
# Common configuration and setup file to generate the ACPICA tools and
|
2011-06-04 01:17:09 +04:00
|
|
|
# utilities: the iASL compiler, acpiexec, acpihelp, acpinames, acpisrc,
|
|
|
|
# acpixtract, acpibin.
|
2009-04-22 20:48:38 +04:00
|
|
|
#
|
|
|
|
# This file is included by the individual makefiles for each tool.
|
|
|
|
#
|
|
|
|
|
2011-06-02 01:51:07 +04:00
|
|
|
#
|
|
|
|
# Note: This makefile is intended to be used from within the native
|
|
|
|
# ACPICA directory structure, from under generate/unix. It specifically
|
|
|
|
# places all object files in a generate/unix subdirectory, not within
|
|
|
|
# the various ACPICA source directories. This prevents collisions
|
|
|
|
# between different compilations of the same source file with different
|
|
|
|
# compile options, and prevents pollution of the source code.
|
|
|
|
#
|
|
|
|
|
2009-04-22 20:48:38 +04:00
|
|
|
#
|
|
|
|
# Configuration
|
2011-06-10 21:36:49 +04:00
|
|
|
# Notes:
|
2011-10-15 01:02:15 +04:00
|
|
|
# $(BITS) must be set to either 32 or 64
|
2011-06-10 21:36:49 +04:00
|
|
|
# gcc should be version 4 or greater, otherwise some of the options
|
|
|
|
# used will not be recognized.
|
|
|
|
# Global optimization flags (such as -O2, -Os) are not used, since
|
|
|
|
# they cause issues on some compilers.
|
|
|
|
# The _GNU_SOURCE symbol is required for many hosts.
|
|
|
|
#
|
2011-10-15 01:02:15 +04:00
|
|
|
.SUFFIXES :
|
2011-06-10 21:36:49 +04:00
|
|
|
PROGS = acpibin acpiexec acpihelp acpinames acpisrc acpixtract iasl
|
2009-04-22 20:48:38 +04:00
|
|
|
HOST = _CYGWIN
|
2011-05-25 19:09:55 +04:00
|
|
|
CC = gcc
|
2009-04-22 20:48:38 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Common defines
|
|
|
|
#
|
2011-10-15 01:02:15 +04:00
|
|
|
OBJDIR = obj$(BITS)
|
|
|
|
BINDIR = bin$(BITS)
|
|
|
|
BITSFLAG = -m$(BITS)
|
2012-07-12 00:50:33 +04:00
|
|
|
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
|
|
|
|
COPYPROG = \
|
|
|
|
@mkdir -p ../$(BINDIR); \
|
|
|
|
if [ -e "$(PROG).exe" ] ; then \
|
|
|
|
mv $(PROG).exe $(PROG); \
|
|
|
|
echo "Renamed $(PROG).exe to $(PROG)"; \
|
|
|
|
fi; \
|
|
|
|
cp --remove-destination $(PROG) ../$(BINDIR); \
|
|
|
|
echo "Copied $(PROG) to ../$(BINDIR)";
|
|
|
|
|
2011-06-10 21:36:49 +04:00
|
|
|
INSTALLDIR = /usr/bin
|
2012-07-12 00:50:33 +04:00
|
|
|
INSTALLPROG = install -D ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)
|
2011-08-20 00:47:02 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Main ACPICA source directories
|
|
|
|
#
|
|
|
|
ACPICA_SRC = ../../../source
|
|
|
|
ACPICA_COMMON = $(ACPICA_SRC)/common
|
|
|
|
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
|
|
|
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
|
|
|
ACPICA_CORE = $(ACPICA_SRC)/components
|
|
|
|
ACPICA_INCLUDE = $(ACPICA_SRC)/include
|
|
|
|
ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
|
|
|
|
ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
|
|
|
|
ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
|
|
|
|
ACPICA_EVENTS = $(ACPICA_CORE)/events
|
|
|
|
ACPICA_EXECUTER = $(ACPICA_CORE)/executer
|
|
|
|
ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
|
|
|
|
ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
|
|
|
|
ACPICA_PARSER = $(ACPICA_CORE)/parser
|
|
|
|
ACPICA_RESOURCES = $(ACPICA_CORE)/resources
|
|
|
|
ACPICA_TABLES = $(ACPICA_CORE)/tables
|
|
|
|
ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
|
|
|
|
|
|
|
|
#
|
|
|
|
# ACPICA tool and utility source directories
|
|
|
|
#
|
|
|
|
ACPIBIN = $(ACPICA_TOOLS)/acpibin
|
|
|
|
ACPIEXEC = $(ACPICA_TOOLS)/acpiexec
|
|
|
|
ACPIHELP = $(ACPICA_TOOLS)/acpihelp
|
|
|
|
ACPINAMES = $(ACPICA_TOOLS)/acpinames
|
|
|
|
ACPISRC = $(ACPICA_TOOLS)/acpisrc
|
|
|
|
ACPIXTRACT = $(ACPICA_TOOLS)/acpixtract
|
|
|
|
ASL_COMPILER = $(ACPICA_SRC)/compiler
|
|
|
|
|
|
|
|
#
|
|
|
|
# Common ACPICA header files
|
|
|
|
#
|
|
|
|
ACPICA_HEADERS = \
|
|
|
|
$(wildcard $(ACPICA_INCLUDE)/*.h) \
|
|
|
|
$(wildcard $(ACPICA_INCLUDE)/platform/*.h)
|
|
|
|
|
2009-04-22 20:48:38 +04:00
|
|
|
#
|
|
|
|
# Common compiler flags. The warning flags in addition to -Wall are not
|
|
|
|
# automatically included in -Wall.
|
|
|
|
#
|
2011-06-04 01:17:09 +04:00
|
|
|
CFLAGS += \
|
2011-10-15 01:02:15 +04:00
|
|
|
$(BITSFLAG) \
|
2011-06-04 01:17:09 +04:00
|
|
|
-D$(HOST) \
|
|
|
|
-D_GNU_SOURCE \
|
2012-07-12 00:50:33 +04:00
|
|
|
-D_FORTIFY_SOURCE=2 \
|
2011-08-20 00:47:02 +04:00
|
|
|
-I$(ACPICA_INCLUDE)
|
2011-06-04 01:17:09 +04:00
|
|
|
|
2011-10-15 01:02:15 +04:00
|
|
|
LDFLAGS += $(BITSFLAG)
|
|
|
|
|
2009-04-22 20:48:38 +04:00
|
|
|
CWARNINGFLAGS = \
|
2011-06-04 01:17:09 +04:00
|
|
|
-ansi \
|
|
|
|
-Wall \
|
|
|
|
-Wbad-function-cast \
|
|
|
|
-Wdeclaration-after-statement \
|
|
|
|
-Werror \
|
|
|
|
-Wformat=2 \
|
|
|
|
-Wmissing-declarations \
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
-Wstrict-aliasing=0 \
|
|
|
|
-Wstrict-prototypes \
|
|
|
|
-Wswitch-default \
|
|
|
|
-Wpointer-arith \
|
|
|
|
-Wundef
|
2009-04-22 20:48:38 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# gcc 4+ flags
|
|
|
|
#
|
2011-06-04 01:17:09 +04:00
|
|
|
CWARNINGFLAGS += \
|
|
|
|
-Waddress \
|
|
|
|
-Waggregate-return \
|
|
|
|
-Wchar-subscripts \
|
|
|
|
-Wempty-body \
|
|
|
|
-Wlogical-op \
|
|
|
|
-Wmissing-declarations \
|
|
|
|
-Wmissing-field-initializers \
|
|
|
|
-Wmissing-parameter-type \
|
|
|
|
-Wnested-externs \
|
|
|
|
-Wold-style-declaration \
|
|
|
|
-Wold-style-definition \
|
|
|
|
-Wredundant-decls \
|
|
|
|
-Wtype-limits
|
2009-04-22 20:48:38 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Extra warning flags (possible future use)
|
|
|
|
#
|
2011-06-04 01:17:09 +04:00
|
|
|
#CWARNINGFLAGS += \
|
2009-04-22 20:48:38 +04:00
|
|
|
# -Wcast-qual \
|
|
|
|
# -Wconversion
|
2009-12-18 23:33:38 +03:00
|
|
|
# -Wshadow \
|
2009-04-22 20:48:38 +04:00
|
|
|
|
|
|
|
#
|
|
|
|
# Bison/Flex configuration
|
|
|
|
#
|
2011-04-15 21:03:35 +04:00
|
|
|
# -v: verbose, produces a .output file
|
|
|
|
# -d: produces the defines header file
|
|
|
|
# -y: act like yacc
|
|
|
|
#
|
|
|
|
# -i: generate case insensitive scanner
|
|
|
|
# -s: suppress default rule, abort on unknown input
|
|
|
|
#
|
|
|
|
# Berkeley yacc configuration
|
|
|
|
#
|
2011-06-04 01:17:09 +04:00
|
|
|
#YACC= byacc
|
|
|
|
#YFLAGS += -v -d
|
2011-04-15 21:03:35 +04:00
|
|
|
#
|
2011-06-04 01:17:09 +04:00
|
|
|
YACC= bison
|
|
|
|
YFLAGS += -v -d -y
|
2009-04-22 20:48:38 +04:00
|
|
|
|
2011-06-04 01:17:09 +04:00
|
|
|
LEX= flex
|
|
|
|
LFLAGS += -i -s
|
2011-10-15 01:02:15 +04:00
|
|
|
|