1# 2# acpixtract - extract binary ACPI tables from acpidump text output 3# 4# NOTE: This makefile is intended to be used in the Linux environment, 5# with the Linux directory structure. It will not work directly 6# on the native ACPICA source tree. 7# 8 9# 10# Configuration 11# Notes: 12# gcc should be version 4 or greater, otherwise some of the options 13# used will not be recognized. 14# Global optimization flags (such as -O2, -Os) are not used, since 15# they cause issues on some compilers. 16# The _GNU_SOURCE symbol is required for many hosts. 17# 18PROG = acpixtract 19 20HOST = _LINUX 21NOMAN = YES 22COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $? 23 24ACPICA_COMPONENTS = 25ACPICA_SRC = ../.. 26ACPICA_COMMON = $(ACPICA_SRC)/common 27ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS) 28ACPICA_TOOLS = $(ACPICA_SRC)/tools 29ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers 30INSTALLDIR = /usr/bin 31INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR) 32 33CFLAGS+= \ 34 -D$(HOST) \ 35 -D_GNU_SOURCE \ 36 -I$(ACPICA_SRC)/include 37 38CWARNINGFLAGS = \ 39 -ansi \ 40 -Wall \ 41 -Wbad-function-cast \ 42 -Wdeclaration-after-statement \ 43 -Werror \ 44 -Wformat=2 \ 45 -Wmissing-declarations \ 46 -Wmissing-prototypes \ 47 -Wstrict-aliasing=0 \ 48 -Wstrict-prototypes \ 49 -Wswitch-default \ 50 -Wpointer-arith \ 51 -Wundef 52 53OBJS = \ 54 acpixtract.o 55 56# 57# Root rule 58# 59$(PROG) : $(OBJS) 60 $(CC) $(LDFLAGS) $(OBJS) -o $(PROG) 61 62# 63# acpixtract source 64# 65acpixtract.o : $(ACPICA_TOOLS)/acpixtract/acpixtract.c 66 $(COMPILE) 67 68 69clean : 70 rm -f $(PROG) $(PROG).exe $(OBJS) 71 72install : 73 $(INSTALLPROG) 74