diff options
Diffstat (limited to 'compiler/Makefile')
-rw-r--r-- | compiler/Makefile | 70 |
1 files changed, 53 insertions, 17 deletions
diff --git a/compiler/Makefile b/compiler/Makefile index 4c54b22b84e7..1807635a2a40 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -1,18 +1,57 @@ # # 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 -PROG= iasl +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) +ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS) ACPICA_TOOLS = $(ACPICA_SRC)/tools ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers - -NOMAN= YES -CFLAGS+= -Wall -O2 -Wstrict-prototypes -D_LINUX -DACPI_ASL_COMPILER -I../include -I../compiler +ASL_COMPILER = $(ACPICA_SRC)/compiler +INSTALLDIR = /usr/bin +INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR) + +CFLAGS+= \ + -D$(HOST) \ + -D_GNU_SOURCE \ + -DACPI_ASL_COMPILER \ + -I$(ACPICA_SRC)/include \ + -I$(ASL_COMPILER) + +CWARNINGFLAGS = \ + -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 # # Bison/Flex configuration @@ -23,11 +62,6 @@ YFLAGS+= -v -d -y LEX= flex LFLAGS+= -i -s - -COMPILE = $(CC) -c $(CFLAGS) -o$@ $? -LDFLAGS += -lpthread -lrt - - OBJS = \ adfile.o \ adisasm.o \ @@ -182,7 +216,6 @@ MISC = \ # $(PROG) : $(INTERMEDIATES) $(OBJS) $(CC) $(OBJS) $(LDFLAGS) -o $(PROG) - $(COPYPROG) # @@ -210,16 +243,16 @@ dtparserparse.c : $(ASL_COMPILER)/dtparser.y # by the utilities above and they are not necessarily ANSI C, etc. # aslcompilerlex.o : aslcompilerlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $? aslcompilerparse.o : aslcompilerparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $? dtparserlex.o : dtparserlex.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $? dtparserparse.o : dtparserparse.c - $(CC) -c $(CFLAGS) -Wall -Werror -o$@ $? + $(CC) -c $(CFLAGS) -Wall -Werror -Wstrict-aliasing=0 -o$@ $? # @@ -632,5 +665,8 @@ osunixxf.o : $(ACPICA_OSL)/osunixxf.c $(COMPILE) -clean : +clean : rm -f $(PROG) $(PROG).exe $(OBJS) $(INTERMEDIATES) $(MISC) + +install : + $(INSTALLPROG) |