mirror of
https://github.com/acpica/acpica/
synced 2024-12-26 04:16:58 +03:00
All makefiles: Remove optimize flags and unneeded defines.
Optimizations like -O2 are seen to cause issues with some compilers. Remove unneeded defines like DEBUG, _CONSOLE, etc. Add _GNU_SOURCE to the Linux makefiles.
This commit is contained in:
parent
6f0bc401ca
commit
4bcdec146b
@ -1,27 +1,38 @@
|
||||
#
|
||||
# acpibin - Binary ACPI table utility
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROG = acpibin
|
||||
|
||||
ACPI_COMPONENTS =
|
||||
HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ../..
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPI_COMPONENTS)
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
NOMAN = YES
|
||||
CFLAGS+= \
|
||||
-O2 \
|
||||
-D_LINUX -DNDEBUG -D_CONSOLE \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-DACPI_BIN_APP \
|
||||
-I$(ACPICA_SRC)/include
|
||||
|
||||
@ -40,8 +51,6 @@ CWARNINGFLAGS = \
|
||||
-Wpointer-arith \
|
||||
-Wundef
|
||||
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
OBJS = \
|
||||
abcompare.o \
|
||||
abmain.o \
|
||||
|
@ -2,28 +2,40 @@
|
||||
# acpiexec: ACPI execution simulator. Runs ACPICA code in user
|
||||
# space. Loads ACPI tables, displays the namespace, and allows
|
||||
# execution of control methods.
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROG = acpiexec
|
||||
|
||||
ACPI_COMPONENTS =
|
||||
HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
LDFLAGS += -lpthread -lrt
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ../..
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPI_COMPONENTS)
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
NOMAN = YES
|
||||
CFLAGS+= \
|
||||
-O2 \
|
||||
-D_LINUX -DNDEBUG -D_CONSOLE \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-DACPI_EXEC_APP \
|
||||
-I$(ACPICA_SRC)/include
|
||||
|
||||
@ -42,9 +54,6 @@ CWARNINGFLAGS = \
|
||||
-Wpointer-arith \
|
||||
-Wundef
|
||||
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
LDFLAGS += -lpthread -lrt
|
||||
|
||||
OBJS = \
|
||||
aeexec.o \
|
||||
aehandlers.o \
|
||||
|
@ -1,28 +1,39 @@
|
||||
#
|
||||
# acpihelp - ACPI Help utility. Displays ASL operator syntax and
|
||||
# information about ACPI predefined names.
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROG = acpihelp
|
||||
|
||||
ACPI_COMPONENTS =
|
||||
HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ../..
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPI_COMPONENTS)
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
NOMAN = YES
|
||||
CFLAGS+= \
|
||||
-O2 \
|
||||
-D_LINUX -DNDEBUG -D_CONSOLE \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-DACPI_HELP_APP \
|
||||
-I$(ACPICA_SRC)/include
|
||||
|
||||
@ -41,8 +52,6 @@ CWARNINGFLAGS = \
|
||||
-Wpointer-arith \
|
||||
-Wundef
|
||||
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
OBJS = \
|
||||
ahmain.o \
|
||||
getopt.o
|
||||
|
@ -2,28 +2,39 @@
|
||||
# acpinames - Load ACPI table and dump namespace. This is a subset
|
||||
# of the AcpiExec functionality, it is intended to demonstrate
|
||||
# the configurability of ACPICA.
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROG = acpinames
|
||||
|
||||
ACPI_COMPONENTS =
|
||||
HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ../..
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPI_COMPONENTS)
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
NOMAN= YES
|
||||
CFLAGS+= \
|
||||
-O2 \
|
||||
-D_LINUX -DNDEBUG -D_CONSOLE \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-DACPI_NAMES_APP \
|
||||
-I$(ACPICA_SRC)/include \
|
||||
-I$(ACPICA_TOOLS)/acpinames
|
||||
@ -43,8 +54,6 @@ CWARNINGFLAGS = \
|
||||
-Wpointer-arith \
|
||||
-Wundef
|
||||
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
OBJS = \
|
||||
anmain.o \
|
||||
anstubs.o \
|
||||
|
@ -1,27 +1,38 @@
|
||||
#
|
||||
# acpisrc - ACPICA source code conversion utility
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROG = acpisrc
|
||||
|
||||
ACPI_COMPONENTS =
|
||||
HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ../..
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPI_COMPONENTS)
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
NOMAN = YES
|
||||
CFLAGS+= \
|
||||
-O2 \
|
||||
-D_LINUX -DNDEBUG -D_CONSOLE \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-DACPI_SRC_APP \
|
||||
-I$(ACPICA_SRC)/include \
|
||||
-I.
|
||||
@ -41,8 +52,6 @@ CWARNINGFLAGS = \
|
||||
-Wpointer-arith \
|
||||
-Wundef
|
||||
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
OBJS = \
|
||||
ascase.o \
|
||||
asconvrt.o \
|
||||
|
@ -1,27 +1,38 @@
|
||||
#
|
||||
# acpixtract - extract binary ACPI tables from acpidump text output
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROG = acpixtract
|
||||
|
||||
ACPI_COMPONENTS =
|
||||
HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ../..
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPI_COMPONENTS)
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
NOMAN = YES
|
||||
CFLAGS+= \
|
||||
-O2 \
|
||||
-D_LINUX -DNDEBUG -D_CONSOLE \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-I$(ACPICA_SRC)/include
|
||||
|
||||
CWARNINGFLAGS = \
|
||||
@ -39,8 +50,6 @@ CWARNINGFLAGS = \
|
||||
-Wpointer-arith \
|
||||
-Wundef
|
||||
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
OBJS = \
|
||||
acpixtract.o
|
||||
|
||||
|
@ -1,28 +1,39 @@
|
||||
#
|
||||
# iASL compiler/disassembler
|
||||
#
|
||||
|
||||
#
|
||||
# NOTE: This makefile is intended to be used in the Linux environment,
|
||||
# with the Linux directory structure. It will not work directly
|
||||
# on the native ACPICA source tree.
|
||||
#
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROG = iasl
|
||||
|
||||
ACPI_COMPONENTS =
|
||||
HOST = _LINUX
|
||||
NOMAN = YES
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
ACPICA_COMPONENTS =
|
||||
ACPICA_SRC = ..
|
||||
ASL_COMPILER = $(ACPICA_SRC)/compiler
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPI_COMPONENTS)
|
||||
ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
ASL_COMPILER = $(ACPICA_SRC)/compiler
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
NOMAN = YES
|
||||
CFLAGS+= \
|
||||
-O2 \
|
||||
-D_LINUX -DNDEBUG -D_CONSOLE \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-DACPI_ASL_COMPILER \
|
||||
-I$(ACPICA_SRC)/include \
|
||||
-I$(ASL_COMPILER)
|
||||
@ -51,8 +62,6 @@ YFLAGS+= -v -d -y
|
||||
LEX= flex
|
||||
LFLAGS+= -i -s
|
||||
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
OBJS = \
|
||||
adfile.o \
|
||||
adisasm.o \
|
||||
|
@ -13,25 +13,25 @@
|
||||
include Makefile.config
|
||||
|
||||
|
||||
all: ${DIRS}
|
||||
${DIRS}: FORCE
|
||||
all: ${PROGS}
|
||||
${PROGS}: FORCE
|
||||
@cd $@; make; ls -al $@
|
||||
|
||||
clean: FORCE
|
||||
@for d in ${DIRS}; do \
|
||||
@for d in ${PROGS}; do \
|
||||
(cd $$d; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
echo "Bad element of DIRS: <$$d>"; \
|
||||
echo "Bad element of PROGS: <$$d>"; \
|
||||
else \
|
||||
pwd; make clean; \
|
||||
fi); \
|
||||
done
|
||||
|
||||
install: FORCE
|
||||
@for d in ${DIRS}; do \
|
||||
@for d in ${PROGS}; do \
|
||||
(cd $$d; \
|
||||
if [ $$? -ne 0 ]; then \
|
||||
echo "Bad element of DIRS: <$$d>"; \
|
||||
echo "Bad element of PROGS: <$$d>"; \
|
||||
else \
|
||||
pwd; make install; \
|
||||
fi); \
|
||||
|
@ -19,33 +19,36 @@
|
||||
|
||||
#
|
||||
# Configuration
|
||||
# Note: gcc should be version 4 or greater, otherwise some of the
|
||||
# options used won't be recognized (see below)
|
||||
# Notes:
|
||||
# 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.
|
||||
#
|
||||
PROGS = acpibin acpiexec acpihelp acpinames acpisrc acpixtract iasl
|
||||
|
||||
HOST = _CYGWIN
|
||||
CC = gcc
|
||||
ACPICA_SRC = ../../../source
|
||||
DIRS = iasl acpiexec acpihelp acpinames acpisrc acpibin acpixtract
|
||||
INSTALLDIR = /usr/bin
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
|
||||
#
|
||||
# Common defines
|
||||
#
|
||||
ASL_COMPILER = $(ACPICA_SRC)/compiler
|
||||
ACPICA_SRC = ../../../source
|
||||
ACPICA_COMMON = $(ACPICA_SRC)/common
|
||||
ACPICA_CORE = $(ACPICA_SRC)/components
|
||||
ACPICA_TOOLS = $(ACPICA_SRC)/tools
|
||||
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
|
||||
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $?
|
||||
ASL_COMPILER = $(ACPICA_SRC)/compiler
|
||||
COPYPROG = @mkdir -p ../bin; rm -f ../bin/$(PROG); cp --remove-destination $(PROG) ../bin
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
|
||||
|
||||
#
|
||||
# Common compiler flags. The warning flags in addition to -Wall are not
|
||||
# automatically included in -Wall.
|
||||
#
|
||||
CFLAGS += \
|
||||
-O2 \
|
||||
-D$(HOST) \
|
||||
-D_GNU_SOURCE \
|
||||
-I$(ACPICA_SRC)/include
|
||||
|
Loading…
Reference in New Issue
Block a user