1#
2# acpiexec: ACPI execution simulator. Runs ACPICA code in user
3# space. Loads ACPI tables, displays the namespace, and allows
4# execution of control methods.
5#
6
7#
8# Note: This makefile is intended to be used from within the native
9# ACPICA directory structure, from under generate/unix. It specifically
10# places all object files in a generate/unix subdirectory, not within
11# the various ACPICA source directories. This prevents collisions
12# between different compilations of the same source file with different
13# compile options, and prevents pollution of the source code.
14#
15include ../Makefile.config
16FINAL_PROG = ../$(BINDIR)/acpiexec
17PROG = $(OBJDIR)/acpiexec
18
19#
20# Search paths for source files
21#
22vpath %.c \
23    $(ACPIEXEC)\
24    $(ACPICA_DEBUGGER)\
25    $(ACPICA_DISASSEMBLER)\
26    $(ACPICA_DISPATCHER)\
27    $(ACPICA_EVENTS)\
28    $(ACPICA_EXECUTER)\
29    $(ACPICA_HARDWARE)\
30    $(ACPICA_NAMESPACE)\
31    $(ACPICA_PARSER)\
32    $(ACPICA_RESOURCES)\
33    $(ACPICA_TABLES)\
34    $(ACPICA_UTILITIES)\
35    $(ACPICA_COMMON)\
36    $(ACPICA_OSL)
37
38HEADERS = \
39    $(wildcard $(ACPIEXEC)/*.h)
40
41OBJECTS = \
42	$(OBJDIR)/acgetline.o\
43	$(OBJDIR)/acfileio.o\
44	$(OBJDIR)/aeexec.o\
45	$(OBJDIR)/aeexception.o\
46	$(OBJDIR)/aehandlers.o\
47	$(OBJDIR)/aeinitfile.o\
48	$(OBJDIR)/aemain.o\
49	$(OBJDIR)/aeregion.o\
50	$(OBJDIR)/aetables.o\
51	$(OBJDIR)/ahids.o\
52	$(OBJDIR)/ahuuids.o\
53	$(OBJDIR)/cmfsize.o\
54	$(OBJDIR)/dbcmds.o\
55	$(OBJDIR)/dbconvert.o\
56	$(OBJDIR)/dbdisply.o\
57	$(OBJDIR)/dbexec.o\
58	$(OBJDIR)/dbfileio.o\
59	$(OBJDIR)/dbhistry.o\
60	$(OBJDIR)/dbinput.o\
61	$(OBJDIR)/dbmethod.o\
62	$(OBJDIR)/dbnames.o\
63	$(OBJDIR)/dbobject.o\
64	$(OBJDIR)/dbstats.o\
65	$(OBJDIR)/dbtest.o\
66	$(OBJDIR)/dbutils.o\
67	$(OBJDIR)/dbxface.o\
68	$(OBJDIR)/dmbuffer.o\
69	$(OBJDIR)/dmcstyle.o\
70	$(OBJDIR)/dmdeferred.o\
71	$(OBJDIR)/dmnames.o\
72	$(OBJDIR)/dmopcode.o\
73	$(OBJDIR)/dmresrc.o\
74	$(OBJDIR)/dmresrcl.o\
75	$(OBJDIR)/dmresrcl2.o\
76	$(OBJDIR)/dmresrcs.o\
77	$(OBJDIR)/dmutils.o\
78	$(OBJDIR)/dmwalk.o\
79	$(OBJDIR)/dsargs.o\
80	$(OBJDIR)/dscontrol.o\
81	$(OBJDIR)/dsdebug.o\
82	$(OBJDIR)/dsfield.o\
83	$(OBJDIR)/dsinit.o\
84	$(OBJDIR)/dsmethod.o\
85	$(OBJDIR)/dsmthdat.o\
86	$(OBJDIR)/dsobject.o\
87	$(OBJDIR)/dsopcode.o\
88	$(OBJDIR)/dspkginit.o\
89	$(OBJDIR)/dsutils.o\
90	$(OBJDIR)/dswexec.o\
91	$(OBJDIR)/dswload.o\
92	$(OBJDIR)/dswload2.o\
93	$(OBJDIR)/dswscope.o\
94	$(OBJDIR)/dswstate.o\
95	$(OBJDIR)/evevent.o\
96	$(OBJDIR)/evglock.o\
97	$(OBJDIR)/evgpe.o\
98	$(OBJDIR)/evgpeblk.o\
99	$(OBJDIR)/evgpeinit.o\
100	$(OBJDIR)/evgpeutil.o\
101	$(OBJDIR)/evhandler.o\
102	$(OBJDIR)/evmisc.o\
103	$(OBJDIR)/evregion.o\
104	$(OBJDIR)/evrgnini.o\
105	$(OBJDIR)/evsci.o\
106	$(OBJDIR)/evxface.o\
107	$(OBJDIR)/evxfevnt.o\
108	$(OBJDIR)/evxfgpe.o\
109	$(OBJDIR)/evxfregn.o\
110	$(OBJDIR)/exconfig.o\
111	$(OBJDIR)/exconcat.o\
112	$(OBJDIR)/exconvrt.o\
113	$(OBJDIR)/excreate.o\
114	$(OBJDIR)/exdebug.o\
115	$(OBJDIR)/exdump.o\
116	$(OBJDIR)/exfield.o\
117	$(OBJDIR)/exfldio.o\
118	$(OBJDIR)/exmisc.o\
119	$(OBJDIR)/exmutex.o\
120	$(OBJDIR)/exnames.o\
121	$(OBJDIR)/exoparg1.o\
122	$(OBJDIR)/exoparg2.o\
123	$(OBJDIR)/exoparg3.o\
124	$(OBJDIR)/exoparg6.o\
125	$(OBJDIR)/exprep.o\
126	$(OBJDIR)/exregion.o\
127	$(OBJDIR)/exresnte.o\
128	$(OBJDIR)/exresolv.o\
129	$(OBJDIR)/exresop.o\
130	$(OBJDIR)/exstore.o\
131	$(OBJDIR)/exstoren.o\
132	$(OBJDIR)/exstorob.o\
133	$(OBJDIR)/exsystem.o\
134	$(OBJDIR)/extrace.o\
135	$(OBJDIR)/exutils.o\
136	$(OBJDIR)/getopt.o\
137	$(OBJDIR)/hwacpi.o\
138	$(OBJDIR)/hwesleep.o\
139	$(OBJDIR)/hwgpe.o\
140	$(OBJDIR)/hwpci.o\
141	$(OBJDIR)/hwregs.o\
142	$(OBJDIR)/hwsleep.o\
143	$(OBJDIR)/hwvalid.o\
144	$(OBJDIR)/hwxface.o\
145	$(OBJDIR)/hwxfsleep.o\
146	$(OBJDIR)/nsaccess.o\
147	$(OBJDIR)/nsalloc.o\
148	$(OBJDIR)/nsarguments.o\
149	$(OBJDIR)/nsconvert.o\
150	$(OBJDIR)/nsdump.o\
151	$(OBJDIR)/nsdumpdv.o\
152	$(OBJDIR)/nseval.o\
153	$(OBJDIR)/nsinit.o\
154	$(OBJDIR)/nsload.o\
155	$(OBJDIR)/nsnames.o\
156	$(OBJDIR)/nsobject.o\
157	$(OBJDIR)/nsparse.o\
158	$(OBJDIR)/nspredef.o\
159	$(OBJDIR)/nsprepkg.o\
160	$(OBJDIR)/nsrepair.o\
161	$(OBJDIR)/nsrepair2.o\
162	$(OBJDIR)/nssearch.o\
163	$(OBJDIR)/nsutils.o\
164	$(OBJDIR)/nswalk.o\
165	$(OBJDIR)/nsxfeval.o\
166	$(OBJDIR)/nsxfname.o\
167	$(OBJDIR)/nsxfobj.o\
168	$(OBJDIR)/osgendbg.o\
169	$(OBJDIR)/osunixxf.o\
170	$(OBJDIR)/psargs.o\
171	$(OBJDIR)/psloop.o\
172	$(OBJDIR)/psobject.o\
173	$(OBJDIR)/psopcode.o\
174	$(OBJDIR)/psopinfo.o\
175	$(OBJDIR)/psparse.o\
176	$(OBJDIR)/psscope.o\
177	$(OBJDIR)/pstree.o\
178	$(OBJDIR)/psutils.o\
179	$(OBJDIR)/pswalk.o\
180	$(OBJDIR)/psxface.o\
181	$(OBJDIR)/rsaddr.o\
182	$(OBJDIR)/rscalc.o\
183	$(OBJDIR)/rscreate.o\
184	$(OBJDIR)/rsdump.o\
185	$(OBJDIR)/rsdumpinfo.o\
186	$(OBJDIR)/rsinfo.o\
187	$(OBJDIR)/rsio.o\
188	$(OBJDIR)/rsirq.o\
189	$(OBJDIR)/rslist.o\
190	$(OBJDIR)/rsmemory.o\
191	$(OBJDIR)/rsmisc.o\
192	$(OBJDIR)/rsserial.o\
193	$(OBJDIR)/rsutils.o\
194	$(OBJDIR)/rsxface.o\
195	$(OBJDIR)/tbdata.o\
196	$(OBJDIR)/tbfadt.o\
197	$(OBJDIR)/tbfind.o\
198	$(OBJDIR)/tbinstal.o\
199	$(OBJDIR)/tbprint.o\
200	$(OBJDIR)/tbutils.o\
201	$(OBJDIR)/tbxface.o\
202	$(OBJDIR)/tbxfload.o\
203	$(OBJDIR)/tbxfroot.o\
204	$(OBJDIR)/utaddress.o\
205	$(OBJDIR)/utalloc.o\
206	$(OBJDIR)/utascii.o\
207	$(OBJDIR)/utbuffer.o\
208	$(OBJDIR)/utcache.o\
209	$(OBJDIR)/utcopy.o\
210	$(OBJDIR)/utdebug.o\
211	$(OBJDIR)/utdecode.o\
212	$(OBJDIR)/utdelete.o\
213	$(OBJDIR)/uterror.o\
214	$(OBJDIR)/uteval.o\
215	$(OBJDIR)/utexcep.o\
216	$(OBJDIR)/utglobal.o\
217	$(OBJDIR)/uthex.o\
218	$(OBJDIR)/utids.o\
219	$(OBJDIR)/utinit.o\
220	$(OBJDIR)/utlock.o\
221	$(OBJDIR)/utmath.o\
222	$(OBJDIR)/utmisc.o\
223	$(OBJDIR)/utmutex.o\
224	$(OBJDIR)/utobject.o\
225	$(OBJDIR)/utosi.o\
226	$(OBJDIR)/utownerid.o\
227	$(OBJDIR)/utnonansi.o\
228	$(OBJDIR)/utpredef.o\
229	$(OBJDIR)/utresdecode.o\
230	$(OBJDIR)/utresrc.o\
231	$(OBJDIR)/utstate.o\
232	$(OBJDIR)/utstring.o\
233	$(OBJDIR)/utstrsuppt.o\
234	$(OBJDIR)/utstrtoul64.o\
235	$(OBJDIR)/uttrack.o\
236	$(OBJDIR)/utuuid.o\
237	$(OBJDIR)/utxface.o\
238	$(OBJDIR)/utxferror.o\
239	$(OBJDIR)/utxfinit.o\
240	$(OBJDIR)/utxfmutex.o
241
242#
243# Flags specific to acpiexec utility
244#
245CFLAGS += \
246    -DACPI_EXEC_APP\
247    -I$(ACPIEXEC)
248
249ifeq ($(ASLTS),TRUE)
250CFLAGS += \
251    -DACPI_CHECKSUM_ABORT=TRUE
252endif
253
254ifneq ($(HOST),_QNX)
255LDFLAGS += -lpthread
256endif
257
258ifneq ($(HOST),_APPLE)
259ifneq ($(HOST),_QNX)
260LDFLAGS += -lrt
261endif
262endif
263
264#
265# Common Rules
266#
267include ../Makefile.rules
268