blob: bdd2d260c494c2e952e20063cffbb8af402660bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
#
# 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
HOST = _LINUX
NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
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
ACPINAMES = $(ACPICA_TOOLS)/acpinames
INSTALLDIR = /usr/bin
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
ACPICA_HEADERS = \
$(wildcard $(ACPICA_INCLUDE)/*.h) \
$(wildcard $(ACPICA_INCLUDE)/platform/*.h)
#
# Search paths for source files
#
vpath %.c \
$(ACPINAMES) \
$(ACPICA_DEBUGGER) \
$(ACPICA_DISPATCHER) \
$(ACPICA_EXECUTER) \
$(ACPICA_NAMESPACE) \
$(ACPICA_PARSER) \
$(ACPICA_TABLES) \
$(ACPICA_UTILITIES) \
$(ACPICA_COMMON) \
$(ACPICA_OSL)
HEADERS = \
$(wildcard $(ACPINAMES)/*.h)
OBJECTS = \
anmain.o \
anstubs.o \
antables.o \
dbfileio.o \
dsfield.o \
dsmthdat.o \
dsobject.o \
dsutils.o \
dswload.o \
dswload2.o \
dswscope.o \
dswstate.o \
excreate.o \
exnames.o \
exresnte.o \
exresolv.o \
exutils.o \
getopt.o \
nsaccess.o \
nsalloc.o \
nsdump.o \
nsinit.o \
nsload.o \
nsnames.o \
nsobject.o \
nsparse.o \
nssearch.o \
nsutils.o \
nswalk.o \
nsxfeval.o \
nsxfname.o \
nsxfobj.o \
osunixxf.o \
psargs.o \
psloop.o \
psopcode.o \
psparse.o \
psscope.o \
pstree.o \
psutils.o \
pswalk.o \
psxface.o \
tbfadt.o \
tbfind.o \
tbinstal.o \
tbutils.o \
tbxface.o \
tbxfroot.o \
utaddress.o \
utalloc.o \
utcache.o \
utdebug.o \
utdecode.o \
utdelete.o \
utglobal.o \
utlock.o \
utmath.o \
utmisc.o \
utmutex.o \
utobject.o \
utstate.o \
utosi.o \
utxferror.o \
utxface.o
CFLAGS+= \
-D$(HOST) \
-D_GNU_SOURCE \
-DACPI_NAMES_APP \
-I$(ACPICA_INCLUDE) \
-I$(ACPINAMES)
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
#
# gcc 4+ flags
#
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
#
# Rules
#
$(PROG) : $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILE)
clean :
rm -f $(PROG) $(PROG).exe $(OBJECTS)
install :
$(INSTALLPROG)
|