mirror of
https://github.com/acpica/acpica/
synced 2024-12-26 20:29:48 +03:00
Update the generic Unix makefiles.
1) Add OPT_CFLAGS to allow the warning flags to by overriden by the command line. Thomas Renninger (trenn@suse.de) 2) Eliminate extraneous spaces from the makefile execution output.
This commit is contained in:
parent
95a8781bc8
commit
3e45e0f238
@ -19,12 +19,16 @@
|
||||
|
||||
#
|
||||
# Configuration
|
||||
#
|
||||
# OPT_CFLAGS can be overridden on the make command line by
|
||||
# adding OPT_CFLAGS="..." to the invocation.
|
||||
#
|
||||
# Notes:
|
||||
# $(BITS) must be set to either 32 or 64
|
||||
# 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.
|
||||
# Global optimization flags (such as -O2, -Os) may cause issues on
|
||||
# some compilers.
|
||||
# The _GNU_SOURCE symbol is required for many hosts.
|
||||
#
|
||||
.SUFFIXES :
|
||||
@ -38,8 +42,8 @@ CC = gcc
|
||||
OBJDIR = obj$(BITS)
|
||||
BINDIR = bin$(BITS)
|
||||
BITSFLAG = -m$(BITS)
|
||||
COMPILEOBJ = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
|
||||
LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
|
||||
COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
|
||||
LINKPROG = $(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
|
||||
INSTALLDIR = /usr/bin
|
||||
INSTALLPROG = install -D ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)
|
||||
|
||||
@ -100,18 +104,25 @@ ACPICA_HEADERS = \
|
||||
$(wildcard $(ACPICA_INCLUDE)/platform/*.h)
|
||||
|
||||
#
|
||||
# Common compiler flags. The warning flags in addition to -Wall are not
|
||||
# automatically included in -Wall.
|
||||
# Common compiler flags
|
||||
#
|
||||
OPT_CFLAGS ?= \
|
||||
-D_FORTIFY_SOURCE=2\
|
||||
-O2\
|
||||
$(CWARNINGFLAGS)
|
||||
|
||||
CFLAGS += \
|
||||
$(BITSFLAG)\
|
||||
-D$(HOST)\
|
||||
-D_GNU_SOURCE\
|
||||
-D_FORTIFY_SOURCE=2 \
|
||||
-I$(ACPICA_INCLUDE)
|
||||
|
||||
LDFLAGS += $(BITSFLAG)
|
||||
|
||||
#
|
||||
# Common compiler warning flags. The warning flags in addition
|
||||
# to -Wall are not automatically included in -Wall.
|
||||
#
|
||||
CWARNINGFLAGS = \
|
||||
-ansi\
|
||||
-Wall\
|
||||
@ -128,7 +139,7 @@ CWARNINGFLAGS = \
|
||||
-Wundef
|
||||
|
||||
#
|
||||
# gcc 4+ flags
|
||||
# Additional gcc 4+ warning flags
|
||||
#
|
||||
CWARNINGFLAGS += \
|
||||
-Waddress\
|
||||
@ -146,11 +157,11 @@ CWARNINGFLAGS += \
|
||||
-Wtype-limits
|
||||
|
||||
#
|
||||
# Extra warning flags (possible future use)
|
||||
# Extra warning flags (for possible future use)
|
||||
#
|
||||
#CWARNINGFLAGS += \
|
||||
# -Wcast-qual\
|
||||
# -Wconversion
|
||||
# -Wconversion\
|
||||
# -Wshadow\
|
||||
|
||||
#
|
||||
|
@ -216,6 +216,7 @@ OBJECTS = \
|
||||
CFLAGS += \
|
||||
-DACPI_EXEC_APP\
|
||||
-I$(ACPIEXEC)
|
||||
|
||||
LDFLAGS += -lpthread -lrt
|
||||
|
||||
#
|
||||
|
@ -33,7 +33,7 @@ OBJECTS = \
|
||||
# Flags specific to acpixtract
|
||||
#
|
||||
CFLAGS += \
|
||||
-DACPI_XTRACT_APP \
|
||||
-DACPI_XTRACT_APP
|
||||
|
||||
#
|
||||
# Common Rules
|
||||
|
Loading…
Reference in New Issue
Block a user