Message ID | 20190619081923.25638-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
Series | Move libfwtsacpica and libfwtsiasl into their own directories | expand |
On 2019-06-19 1:19 a.m., Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Currently these libraries have been built in various places > in the acpica source trees which is messy to say the least. > Clean this up by building the librariers in their own > directories. I've been wanting to do this for ~8 years, > finally got around to it. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > configure.ac | 4 +- > src/Makefile.am | 11 +- > src/acpica/Makefile.am | 288 ---------------- > src/acpica/source/compiler/Makefile.am | 306 ----------------- > src/lib/src/Makefile.am | 9 +- > src/libfwtsacpica/Makefile.am | 289 ++++++++++++++++ > src/{acpica => libfwtsacpica}/fwts_acpica.c | 0 > src/libfwtsiasl/Makefile.am | 312 ++++++++++++++++++ > .../fwts_iasl_interface.c | 0 > .../fwts_iasl_interface.h | 0 > 10 files changed, 616 insertions(+), 603 deletions(-) > delete mode 100644 src/acpica/Makefile.am > delete mode 100644 src/acpica/source/compiler/Makefile.am > create mode 100644 src/libfwtsacpica/Makefile.am > rename src/{acpica => libfwtsacpica}/fwts_acpica.c (100%) > create mode 100644 src/libfwtsiasl/Makefile.am > rename src/{acpica/source/compiler => libfwtsiasl}/fwts_iasl_interface.c (100%) > rename src/{acpica/source/compiler => libfwtsiasl}/fwts_iasl_interface.h (100%) > > diff --git a/configure.ac b/configure.ac > index 0109d644..39a445cd 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -101,8 +101,8 @@ > AC_CONFIG_FILES([ > Makefile > src/Makefile > - src/acpica/source/compiler/Makefile > - src/acpica/Makefile > + src/libfwtsiasl/Makefile > + src/libfwtsacpica/Makefile > src/lib/Makefile > src/lib/src/Makefile > src/utilities/Makefile > diff --git a/src/Makefile.am b/src/Makefile.am > index 62c9ba8f..904fc020 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -4,7 +4,7 @@ > # 3. acpica > # ... because the libs in this bundled acpica/ depend on lib/ (libfwts.so), > # but libfwts.so depends on libraries produced by acpica/source/compiler. > -SUBDIRS = acpica/source/compiler lib acpica > +SUBDIRS = libfwtsiasl lib libfwtsacpica > > AM_CPPFLAGS = \ > -I$(top_srcdir)/src/lib/include \ > @@ -197,7 +197,12 @@ fwts_SOURCES = main.c \ > fwts_LDFLAGS = -lm -lbsd `pkg-config --libs glib-2.0 gio-2.0` > > fwts_LDADD = \ > - -L$(top_builddir)/src/acpica -lfwtsacpica \ > - -Llib/src -lfwts > + -L$(top_builddir)/src \ > + -L$(top_builddir)/src/acpica \ > + -L$(top_builddir)/src/libfwtsiasl \ > + -L$(top_builddir)/src/libfwtsacpica \ > + -L$(top_builddir)/src/lib/src \ > + -lfwtsacpica \ > + -lfwts > > man_MANS = ../doc/fwts.1 ../doc/fwts-collect.1 ../doc/fwts-frontend-text.1 > diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am > deleted file mode 100644 > index 03dd9820..00000000 > --- a/src/acpica/Makefile.am > +++ /dev/null > @@ -1,288 +0,0 @@ > -# > -# Copyright (C) 2010-2019 Canonical, Ltd. > -# > -# This program is free software; you can redistribute it and/or > -# modify it under the terms of the GNU General Public License > -# as published by the Free Software Foundation; either version 2 > -# of the License, or (at your option) any later version. > -# > -# This program is distributed in the hope that it will be useful, > -# but WITHOUT ANY WARRANTY; without even the implied warranty of > -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > -# GNU General Public License for more details. > -# > -# You should have received a copy of the GNU General Public License > -# along with this program; if not, write to the Free Software > -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > -# > - > -# Nb. the top-level Makefile builds source/compiler for us now... > -## SUBDIRS = source/compiler > - > -# > -# -DACPI_EXEC_APP is specific to making ACPICA for the fwts method test > -# > -AM_CPPFLAGS = \ > - -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP \ > - -I$(top_srcdir)/src/lib/include \ > - -I$(srcdir)/source/include \ > - -I$(srcdir)/source/tools/acpiexec \ > - `pkg-config --silence-errors --cflags json` \ > - `pkg-config --silence-errors --cflags json-c` \ > - -Wall -fno-strict-aliasing \ > - -Wno-address-of-packed-member > - > -# > -# We rename some of the functions so we can override them in fwts. This > -# is a hack, I feel dirty now. > -# > -osunixxf_munged.c: $(srcdir)/source/os_specific/service_layers/osunixxf.c > - cat $^ | \ > - sed 's/^AcpiOsPrintf/__AcpiOsPrintf/' | \ > - sed 's/^AcpiOsReadPort/__AcpiOsReadPort/' | \ > - sed 's/^AcpiOsReadPciConfiguration/__AcpiOsReadPciConfiguration/' | \ > - sed 's/^AcpiOsSignalSemaphore/__AcpiOsSignalSemaphore/' | \ > - sed 's/^AcpiOsWaitSemaphore/__AcpiOsWaitSemaphore/' | \ > - sed 's/^AcpiOsCreateSemaphore/__AcpiOsCreateSemaphore/' | \ > - sed 's/^AcpiOsDeleteSemaphore/__AcpiOsDeleteSemaphore/' | \ > - sed 's/^AcpiOsVprintf/__AcpiOsVprintf/' | \ > - sed 's/^AcpiOsSignal/__AcpiOsSignal/' | \ > - sed 's/^AcpiOsSleep/__AcpiOsSleep/' | \ > - sed 's/^AcpiOsExecute/__AcpiOsExecute/' \ > - > $@ > -# > -# Force maximum loop iterations to be just 128 instead of 0xffff > -# because we really don't want to wait until the sun turns into > -# a lump of coal before we complete a blocked operation > -# > -dscontrol_munged.c: $(srcdir)/source/components/dispatcher/dscontrol.c > - cat $^ | \ > - sed 's/ACPI_MAX_LOOP_ITERATIONS/0x0080/' \ > - > $@ > - > -BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c > - > -# > -# Source files that are generated on-the fly and need cleaning > -# > -CLEANFILES = osunixxf_munged.c \ > - dscontrol_munged.c \ > - source/compiler/aslcompiler.output \ > - source/compiler/dtparser.output \ > - source/compiler/dtparser.y.h \ > - source/compiler/prparser.output \ > - source/compiler/prparser.y.h \ > - source/compiler/prparserlex.c \ > - source/compiler/prparserparse.c > - > -pkglib_LTLIBRARIES = libfwtsacpica.la > - > -libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0 > -libfwtsacpica_la_CPPFLAGS = $(AM_CPPFLAGS) > - > -# > -# fwts acpica library sources > -# > -libfwtsacpica_la_SOURCES = \ > - fwts_acpica.c \ > - osunixxf_munged.c \ > - dscontrol_munged.c \ > - source/components/debugger/dbcmds.c \ > - source/components/debugger/dbdisply.c \ > - source/components/debugger/dbexec.c \ > - source/components/debugger/dbfileio.c \ > - source/components/debugger/dbhistry.c \ > - source/components/debugger/dbinput.c \ > - source/components/debugger/dbstats.c \ > - source/components/debugger/dbobject.c \ > - source/components/debugger/dbutils.c \ > - source/components/debugger/dbxface.c \ > - source/components/debugger/dbmethod.c \ > - source/components/debugger/dbnames.c \ > - source/components/debugger/dbconvert.c \ > - source/components/debugger/dbtest.c \ > - source/components/disassembler/dmbuffer.c \ > - source/components/disassembler/dmcstyle.c \ > - source/components/disassembler/dmnames.c \ > - source/components/disassembler/dmopcode.c \ > - source/components/disassembler/dmresrc.c \ > - source/components/disassembler/dmresrcl.c \ > - source/components/disassembler/dmresrcs.c \ > - source/components/disassembler/dmutils.c \ > - source/components/disassembler/dmwalk.c \ > - source/components/disassembler/dmresrcl2.c \ > - source/components/disassembler/dmdeferred.c \ > - source/components/dispatcher/dsdebug.c \ > - source/components/dispatcher/dsfield.c \ > - source/components/dispatcher/dsinit.c \ > - source/components/dispatcher/dsmethod.c \ > - source/components/dispatcher/dsmthdat.c \ > - source/components/dispatcher/dsobject.c \ > - source/components/dispatcher/dspkginit.c \ > - source/components/dispatcher/dsutils.c \ > - source/components/dispatcher/dswexec.c \ > - source/components/dispatcher/dswload.c \ > - source/components/dispatcher/dswscope.c \ > - source/components/dispatcher/dswstate.c \ > - source/components/dispatcher/dsargs.c \ > - source/components/dispatcher/dswload2.c \ > - source/components/dispatcher/dsopcode.c \ > - source/components/events/evevent.c \ > - source/components/events/evgpe.c \ > - source/components/events/evgpeblk.c \ > - source/components/events/evgpeinit.c \ > - source/components/events/evgpeutil.c \ > - source/components/events/evxfgpe.c \ > - source/components/events/evmisc.c \ > - source/components/events/evregion.c \ > - source/components/events/evrgnini.c \ > - source/components/events/evsci.c \ > - source/components/events/evxface.c \ > - source/components/events/evxfevnt.c \ > - source/components/events/evxfregn.c \ > - source/components/events/evglock.c \ > - source/components/events/evhandler.c \ > - source/components/executer/exconcat.c \ > - source/components/executer/exfield.c \ > - source/components/executer/exfldio.c \ > - source/components/executer/exmisc.c \ > - source/components/executer/exmutex.c \ > - source/components/executer/exnames.c \ > - source/components/executer/exoparg1.c \ > - source/components/executer/exoparg2.c \ > - source/components/executer/exoparg3.c \ > - source/components/executer/exoparg6.c \ > - source/components/executer/exprep.c \ > - source/components/executer/exregion.c \ > - source/components/executer/exresnte.c \ > - source/components/executer/exresolv.c \ > - source/components/executer/exresop.c \ > - source/components/executer/exserial.c \ > - source/components/executer/exstore.c \ > - source/components/executer/exstoren.c \ > - source/components/executer/exstorob.c \ > - source/components/executer/exsystem.c \ > - source/components/executer/extrace.c \ > - source/components/executer/exutils.c \ > - source/components/executer/exconvrt.c \ > - source/components/executer/excreate.c \ > - source/components/executer/exdump.c \ > - source/components/executer/exdebug.c \ > - source/components/executer/exconfig.c \ > - source/components/hardware/hwacpi.c \ > - source/components/hardware/hwgpe.c \ > - source/components/hardware/hwpci.c \ > - source/components/hardware/hwregs.c \ > - source/components/hardware/hwsleep.c \ > - source/components/hardware/hwvalid.c \ > - source/components/hardware/hwxface.c \ > - source/components/hardware/hwxfsleep.c \ > - source/components/hardware/hwesleep.c \ > - source/components/namespace/nsaccess.c \ > - source/components/namespace/nsalloc.c \ > - source/components/namespace/nsdump.c \ > - source/components/namespace/nsdumpdv.c \ > - source/components/namespace/nseval.c \ > - source/components/namespace/nsinit.c \ > - source/components/namespace/nsload.c \ > - source/components/namespace/nsnames.c \ > - source/components/namespace/nsobject.c \ > - source/components/namespace/nsparse.c \ > - source/components/namespace/nspredef.c \ > - source/components/namespace/nsrepair.c \ > - source/components/namespace/nsrepair2.c \ > - source/components/namespace/nssearch.c \ > - source/components/namespace/nsutils.c \ > - source/components/namespace/nswalk.c \ > - source/components/namespace/nsxfeval.c \ > - source/components/namespace/nsxfname.c \ > - source/components/namespace/nsxfobj.c \ > - source/components/namespace/nsconvert.c \ > - source/components/namespace/nsprepkg.c \ > - source/components/namespace/nsarguments.c \ > - source/components/parser/psargs.c \ > - source/components/parser/psloop.c \ > - source/components/parser/psopcode.c \ > - source/components/parser/psparse.c \ > - source/components/parser/psscope.c \ > - source/components/parser/pstree.c \ > - source/components/parser/psutils.c \ > - source/components/parser/pswalk.c \ > - source/components/parser/psxface.c \ > - source/components/parser/psopinfo.c \ > - source/components/parser/psobject.c \ > - source/components/resources/rsaddr.c \ > - source/components/resources/rscalc.c \ > - source/components/resources/rscreate.c \ > - source/components/resources/rsdump.c \ > - source/components/resources/rsio.c \ > - source/components/resources/rsinfo.c \ > - source/components/resources/rsirq.c \ > - source/components/resources/rslist.c \ > - source/components/resources/rsmemory.c \ > - source/components/resources/rsmisc.c \ > - source/components/resources/rsutils.c \ > - source/components/resources/rsxface.c \ > - source/components/resources/rsserial.c \ > - source/components/resources/rsdumpinfo.c \ > - source/components/tables/tbdata.c \ > - source/components/tables/tbfadt.c \ > - source/components/tables/tbfind.c \ > - source/components/tables/tbinstal.c \ > - source/components/tables/tbutils.c \ > - source/components/tables/tbxface.c \ > - source/components/tables/tbxfroot.c \ > - source/components/tables/tbxfload.c \ > - source/components/tables/tbprint.c \ > - source/components/utilities/utaddress.c \ > - source/components/utilities/utalloc.c \ > - source/components/utilities/utascii.c \ > - source/components/utilities/utcache.c \ > - source/components/utilities/utcopy.c \ > - source/components/utilities/utdebug.c \ > - source/components/utilities/utdelete.c \ > - source/components/utilities/uteval.c \ > - source/components/utilities/utglobal.c \ > - source/components/utilities/uthex.c \ > - source/components/utilities/utids.c \ > - source/components/utilities/utinit.c \ > - source/components/utilities/utlock.c \ > - source/components/utilities/utmath.c \ > - source/components/utilities/utmisc.c \ > - source/components/utilities/utmutex.c \ > - source/components/utilities/utnonansi.c \ > - source/components/utilities/utobject.c \ > - source/components/utilities/utresdecode.c \ > - source/components/utilities/utresrc.c \ > - source/components/utilities/utstate.c \ > - source/components/utilities/utstrtoul64.c \ > - source/components/utilities/uttrack.c \ > - source/components/utilities/utosi.c \ > - source/components/utilities/utxferror.c \ > - source/components/utilities/utxface.c \ > - source/components/utilities/utdecode.c \ > - source/components/utilities/utexcep.c \ > - source/components/utilities/utpredef.c \ > - source/components/utilities/utstring.c \ > - source/components/utilities/utstrsuppt.c \ > - source/components/utilities/utownerid.c \ > - source/components/utilities/utxfinit.c \ > - source/components/utilities/uterror.c \ > - source/components/utilities/utbuffer.c \ > - source/components/utilities/utuuid.c \ > - source/common/acfileio.c \ > - source/common/acgetline.c \ > - source/common/ahids.c \ > - source/common/cmfsize.c \ > - source/common/ahtable.c \ > - source/common/ahuuids.c \ > - source/tools/acpiexec/aeinitfile.c \ > - source/tools/acpiexec/aehandlers.c \ > - source/tools/acpiexec/aeexception.c \ > - source/tools/acpiexec/aeregion.c \ > - source/tools/acpiexec/aeinstall.c \ > - source/os_specific/service_layers/osgendbg.c > - > -libfwtsacpica_la_LIBADD = \ > - -L$(top_builddir)/src/lib/src -lfwts -lrt > - > diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am > deleted file mode 100644 > index b237b47c..00000000 > --- a/src/acpica/source/compiler/Makefile.am > +++ /dev/null > @@ -1,306 +0,0 @@ > -# > -# Copyright (C) 2011-2019 Canonical, Ltd. > -# > -# This program is free software; you can redistribute it and/or > -# modify it under the terms of the GNU General Public License > -# as published by the Free Software Foundation; either version 2 > -# of the License, or (at your option) any later version. > -# > -# This program is distributed in the hope that it will be useful, > -# but WITHOUT ANY WARRANTY; without even the implied warranty of > -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > -# GNU General Public License for more details. > -# > -# You should have received a copy of the GNU General Public License > -# along with this program; if not, write to the Free Software > -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > -# > - > -# > -# We need to build this as a separate shared library with the iasl functionality built in. We > -# just export the fwts_* interface. > -# > -AUTOMAKE_OPTIONS = subdir-objects > - > -AM_CPPFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -D_LINUX \ > - -DACPI_ASL_COMPILER $(CFLAGS) -I$(top_srcdir)/src/acpica/source/include > - > -AM_YFLAGS = -d > - > -# > -# Case in-sensitive scanning > -# > -AM_LFLAGS = -i > - > -ASL_PARSER = \ > - $(srcdir)/aslcstyle.y \ > - $(srcdir)/aslhelpers.y \ > - $(srcdir)/aslparser.y \ > - $(srcdir)/aslprimaries.y \ > - $(srcdir)/aslresources.y \ > - $(srcdir)/aslrules.y \ > - $(srcdir)/aslsupport.y \ > - $(srcdir)/asltokens.y \ > - $(srcdir)/asltypes.y > - > -ASL_LEXER = > - $(srcdir)/aslcompiler.l \ > - $(srcdir)/aslsupport.l \ > - $(srcdir)/aslcompiler.y.h > - > -$(srcdir)/aslcompiler.y: $(ASL_PARSER) > - m4 -P -I$(srcdir) $(srcdir)/aslparser.y > $@ > - > -$(srcdir)/aslcompilerlex.c: $(ASL_LEXER) > - ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(srcdir)/aslcompiler.l > - > -.NOTPARALLEL: $(srcdir)/aslcompiler.c > -$(srcdir)/aslcompiler.c $(srcdir)/aslcompiler.y.h: $(srcdir)/aslcompiler.y > - ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ > - mv aslcompiler.tab.c aslcompiler.c > - mv aslcompiler.tab.h aslcompiler.y.h > - > -.NOTPARALLEL: $(srcdir)/dtparserlex.c > -$(srcdir)/dtparserlex.c $(srcdir)/dtparser.c $(srcdir)/dtparser.y.h: $(srcdir)/dtparser.l $(srcdir)/dtparser.y > - ${LEX} ${AM_LFLAGS} -PDtParser -o$(srcdir)/dtparserlex.c $< > - ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(srcdir)/dtparser.y > - mv dtparser.tab.c dtparser.c > - mv dtparser.tab.h dtparser.y.h > - > -.NOTPARALLEL: $(srcdir)/prparserlex.c > -$(srcdir)/prparserlex.c $(srcdir)/prparser.c $(srcdir)/prparser.y.h: $(srcdir)/prparser.l $(srcdir)/prparser.y > - ${LEX} ${AM_LFLAGS} -PPrParser -o$(srcdir)/prparserlex.c $< > - ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(srcdir)/prparser.y > - mv prparser.tab.c prparser.c > - mv prparser.tab.h prparser.y.h > - > -pkglib_LTLIBRARIES = libfwtsiasl.la > - > -BUILT_SOURCES = aslcompiler.y \ > - aslcompiler.y.h \ > - aslcompilerlex.c \ > - aslcompiler.c \ > - dtparser.y.h \ > - dtparserlex.c \ > - dtparser.c \ > - prparser.y.h \ > - prparserlex.c \ > - prparser.c > - > -# > -# Just export fwts specific API so we don't clash with core ACPICA library > -# > -libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -lpthread -version-info 1:0:0 > - > -CLEANFILES = $(BUILT_SOURCES) > - > -libfwtsiasl_la_CPPFLAGS = $(AM_CPPFLAGS) > -libfwtsiasl_la_SOURCES = \ > - fwts_iasl_interface.c \ > - aslcompilerlex.c \ > - aslcompiler.c \ > - dtparserlex.c \ > - dtparser.c \ > - prparserlex.c \ > - prparser.c \ > - ../common/adisasm.c \ > - ../common/acfileio.c \ > - ../common/adfile.c \ > - ../common/adwalk.c \ > - ../common/ahids.c \ > - ../common/ahpredef.c \ > - ../common/ahtable.c \ > - ../common/ahuuids.c \ > - ../compiler/aslallocate.c \ > - ../compiler/aslanalyze.c \ > - ../compiler/aslascii.c \ > - ../compiler/aslbtypes.c \ > - ../compiler/aslcache.c \ > - ../compiler/aslcodegen.c \ > - ../compiler/aslcompile.c \ > - ../compiler/asldebug.c \ > - ../compiler/aslerror.c \ > - ../compiler/aslexternal.c \ > - ../compiler/aslfiles.c \ > - ../compiler/aslfileio.c \ > - ../compiler/aslfold.c \ > - ../compiler/aslhelp.c \ > - ../compiler/aslhex.c \ > - ../compiler/asllength.c \ > - ../compiler/asllisting.c \ > - ../compiler/asllistsup.c \ > - ../compiler/aslload.c \ > - ../compiler/asllookup.c \ > - ../compiler/aslmain.c \ > - ../compiler/aslmap.c \ > - ../compiler/aslmapenter.c \ > - ../compiler/aslmapoutput.c \ > - ../compiler/aslmaputils.c \ > - ../compiler/aslmessages.c \ > - ../compiler/aslmethod.c \ > - ../compiler/aslnamesp.c \ > - ../compiler/asloffset.c \ > - ../compiler/aslopcodes.c \ > - ../compiler/asloperands.c \ > - ../compiler/aslopt.c \ > - ../compiler/asloptions.c \ > - ../compiler/aslparseop.c \ > - ../compiler/aslpredef.c \ > - ../compiler/aslprepkg.c \ > - ../compiler/aslprintf.c \ > - ../compiler/aslprune.c \ > - ../compiler/aslresource.c \ > - ../compiler/aslrestype1.c \ > - ../compiler/aslrestype1i.c \ > - ../compiler/aslrestype2.c \ > - ../compiler/aslrestype2d.c \ > - ../compiler/aslrestype2e.c \ > - ../compiler/aslrestype2q.c \ > - ../compiler/aslrestype2s.c \ > - ../compiler/aslrestype2w.c \ > - ../compiler/aslstartup.c \ > - ../compiler/aslstubs.c \ > - ../compiler/aslpld.c \ > - ../compiler/asltransform.c \ > - ../compiler/asltree.c \ > - ../compiler/aslutils.c \ > - ../compiler/asluuid.c \ > - ../compiler/aslwalks.c \ > - ../compiler/aslxref.c \ > - ../compiler/aslxrefout.c \ > - ../compiler/cvcompiler.c \ > - ../compiler/cvdisasm.c \ > - ../compiler/cvparser.c \ > - ../common/cmfsize.c \ > - ../components/debugger/dbfileio.c \ > - ../components/disassembler/dmbuffer.c \ > - ../components/disassembler/dmcstyle.c \ > - ../components/disassembler/dmdeferred.c \ > - ../common/dmextern.c \ > - ../components/disassembler/dmnames.c \ > - ../components/disassembler/dmopcode.c \ > - ../components/disassembler/dmresrc.c \ > - ../components/disassembler/dmresrcl.c \ > - ../components/disassembler/dmresrcl2.c \ > - ../components/disassembler/dmresrcs.c \ > - ../common/dmrestag.c \ > - ../common/dmswitch.c \ > - ../common/dmtable.c \ > - ../common/dmtables.c \ > - ../common/dmtbdump.c \ > - ../common/dmtbdump1.c \ > - ../common/dmtbdump2.c \ > - ../common/dmtbdump3.c \ > - ../common/dmtbinfo.c \ > - ../common/dmtbinfo1.c \ > - ../common/dmtbinfo2.c \ > - ../common/dmtbinfo3.c \ > - ../components/disassembler/dmutils.c \ > - ../components/disassembler/dmwalk.c \ > - ../components/dispatcher/dsargs.c \ > - ../components/dispatcher/dscontrol.c \ > - ../components/dispatcher/dsfield.c \ > - ../components/dispatcher/dsobject.c \ > - ../components/dispatcher/dsopcode.c \ > - ../components/dispatcher/dspkginit.c \ > - ../components/dispatcher/dsutils.c \ > - ../components/dispatcher/dswexec.c \ > - ../components/dispatcher/dswload.c \ > - ../components/dispatcher/dswload2.c \ > - ../components/dispatcher/dswscope.c \ > - ../components/dispatcher/dswstate.c \ > - ../compiler/dtcompile.c \ > - ../compiler/dtexpress.c \ > - ../compiler/dtfield.c \ > - ../compiler/dtio.c \ > - ../compiler/dtsubtable.c \ > - ../compiler/dttable.c \ > - ../compiler/dttable1.c \ > - ../compiler/dttable2.c \ > - ../compiler/dttemplate.c \ > - ../compiler/dtutils.c \ > - ../components/executer/exconcat.c \ > - ../components/executer/exconvrt.c \ > - ../components/executer/excreate.c \ > - ../components/executer/exdump.c \ > - ../components/executer/exmisc.c \ > - ../components/executer/exmutex.c \ > - ../components/executer/exnames.c \ > - ../components/executer/exoparg1.c \ > - ../components/executer/exoparg2.c \ > - ../components/executer/exoparg3.c \ > - ../components/executer/exoparg6.c \ > - ../components/executer/exprep.c \ > - ../components/executer/exregion.c \ > - ../components/executer/exresnte.c \ > - ../components/executer/exresolv.c \ > - ../components/executer/exresop.c \ > - ../components/executer/exstore.c \ > - ../components/executer/exstoren.c \ > - ../components/executer/exstorob.c \ > - ../components/executer/exsystem.c \ > - ../components/executer/exutils.c \ > - ../common/getopt.c \ > - ../components/namespace/nsaccess.c \ > - ../components/namespace/nsalloc.c \ > - ../components/namespace/nsdump.c \ > - ../components/namespace/nsnames.c \ > - ../components/namespace/nsobject.c \ > - ../components/namespace/nsparse.c \ > - ../components/namespace/nssearch.c \ > - ../components/namespace/nsutils.c \ > - ../components/namespace/nswalk.c \ > - ../components/namespace/nsxfobj.c \ > - ../os_specific/service_layers/osunixxf.c\ > - ../compiler/prexpress.c \ > - ../compiler/prmacros.c \ > - ../compiler/prscan.c \ > - ../compiler/prutils.c \ > - ../components/parser/psargs.c \ > - ../components/parser/psloop.c \ > - ../components/parser/psobject.c \ > - ../components/parser/psopcode.c \ > - ../components/parser/psopinfo.c \ > - ../components/parser/psparse.c \ > - ../components/parser/psscope.c \ > - ../components/parser/pstree.c \ > - ../components/parser/psutils.c \ > - ../components/parser/pswalk.c \ > - ../components/tables/tbdata.c \ > - ../components/tables/tbfadt.c \ > - ../components/tables/tbinstal.c \ > - ../components/tables/tbprint.c \ > - ../components/tables/tbutils.c \ > - ../components/tables/tbxface.c \ > - ../components/tables/tbxfload.c \ > - ../components/utilities/utaddress.c \ > - ../components/utilities/utalloc.c \ > - ../components/utilities/utascii.c \ > - ../components/utilities/utbuffer.c \ > - ../components/utilities/utcache.c \ > - ../components/utilities/utcopy.c \ > - ../components/utilities/utdebug.c \ > - ../components/utilities/utdecode.c \ > - ../components/utilities/utdelete.c \ > - ../components/utilities/uterror.c \ > - ../components/utilities/utexcep.c \ > - ../components/utilities/utglobal.c \ > - ../components/utilities/uthex.c \ > - ../components/utilities/utinit.c \ > - ../components/utilities/utlock.c \ > - ../components/utilities/utmath.c \ > - ../components/utilities/utmisc.c \ > - ../components/utilities/utmutex.c \ > - ../components/utilities/utnonansi.c \ > - ../components/utilities/utobject.c \ > - ../components/utilities/utownerid.c \ > - ../components/utilities/utpredef.c \ > - ../components/utilities/utresdecode.c \ > - ../components/utilities/utresrc.c \ > - ../components/utilities/utstate.c \ > - ../components/utilities/utstrtoul64.c \ > - ../components/utilities/utstrsuppt.c \ > - ../components/utilities/utstring.c \ > - ../components/utilities/utuuid.c \ > - ../components/utilities/utxface.c \ > - ../components/utilities/utxferror.c > diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am > index 6bcf9f86..299f9c09 100644 > --- a/src/lib/src/Makefile.am > +++ b/src/lib/src/Makefile.am > @@ -18,6 +18,7 @@ > > AM_CPPFLAGS = \ > -I$(top_srcdir)/src/lib/include \ > + -I$(top_srcdir)/src/libfwtsiasl \ > -I$(top_srcdir)/src/acpica/source/include \ > -I$(top_srcdir)/src/acpica/source/compiler \ > `pkg-config --silence-errors --cflags json` \ > @@ -29,10 +30,10 @@ AM_CPPFLAGS = \ > > pkglib_LTLIBRARIES = libfwts.la > > -libfwts_la_LDFLAGS = \ > - -lm -lpthread -lbsd \ > - -version-info 1:0:0 \ > - -L$(top_builddir)/src/acpica/source/compiler \ > +libfwts_la_LDFLAGS = \ > + -lm -lpthread -lbsd \ > + -version-info 1:0:0 \ > + -L$(top_builddir)/src/libfwtsiasl \ > -lfwtsiasl `pkg-config --libs glib-2.0 gio-2.0` > > libfwts_la_CPPFLAGS = $(AM_CPPFLAGS) -DACPI_DEBUG_OUTPUT > diff --git a/src/libfwtsacpica/Makefile.am b/src/libfwtsacpica/Makefile.am > new file mode 100644 > index 00000000..509d4306 > --- /dev/null > +++ b/src/libfwtsacpica/Makefile.am > @@ -0,0 +1,289 @@ > +# > +# Copyright (C) 2010-2019 Canonical, Ltd. > +# > +# This program is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public License > +# as published by the Free Software Foundation; either version 2 > +# of the License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > +# > + > +# Nb. the top-level Makefile builds source/compiler for us now... > + > +ACPICA = $(top_srcdir)/src/acpica/source > + > +# > +# -DACPI_EXEC_APP is specific to making ACPICA for the fwts method test > +# > +AM_CPPFLAGS = \ > + -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP \ > + -I$(top_srcdir)/src/lib/include \ > + -I$(ACPICA)/include \ > + -I$(ACPICA)/tools/acpiexec \ > + `pkg-config --silence-errors --cflags json` \ > + `pkg-config --silence-errors --cflags json-c` \ > + -Wall -fno-strict-aliasing \ > + -Wno-address-of-packed-member > + > +# > +# We rename some of the functions so we can override them in fwts. This > +# is a hack, I feel dirty now. > +# > +osunixxf_munged.c: $(ACPICA)/os_specific/service_layers/osunixxf.c > + cat $^ | \ > + sed 's/^AcpiOsPrintf/__AcpiOsPrintf/' | \ > + sed 's/^AcpiOsReadPort/__AcpiOsReadPort/' | \ > + sed 's/^AcpiOsReadPciConfiguration/__AcpiOsReadPciConfiguration/' | \ > + sed 's/^AcpiOsSignalSemaphore/__AcpiOsSignalSemaphore/' | \ > + sed 's/^AcpiOsWaitSemaphore/__AcpiOsWaitSemaphore/' | \ > + sed 's/^AcpiOsCreateSemaphore/__AcpiOsCreateSemaphore/' | \ > + sed 's/^AcpiOsDeleteSemaphore/__AcpiOsDeleteSemaphore/' | \ > + sed 's/^AcpiOsVprintf/__AcpiOsVprintf/' | \ > + sed 's/^AcpiOsSignal/__AcpiOsSignal/' | \ > + sed 's/^AcpiOsSleep/__AcpiOsSleep/' | \ > + sed 's/^AcpiOsExecute/__AcpiOsExecute/' \ > + > $@ > +# > +# Force maximum loop iterations to be just 128 instead of 0xffff > +# because we really don't want to wait until the sun turns into > +# a lump of coal before we complete a blocked operation > +# > +dscontrol_munged.c: $(ACPICA)/components/dispatcher/dscontrol.c > + cat $^ | \ > + sed 's/ACPI_MAX_LOOP_ITERATIONS/0x0080/' \ > + > $@ > + > +BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c > + > +# > +# Source files that are generated on-the fly and need cleaning > +# > +CLEANFILES = osunixxf_munged.c \ > + dscontrol_munged.c \ > + $(ACPICA)/compiler/aslcompiler.output \ > + $(ACPICA)/compiler/dtparser.output \ > + $(ACPICA)/compiler/dtparser.y.h \ > + $(ACPICA)/compiler/prparser.output \ > + $(ACPICA)/compiler/prparser.y.h \ > + $(ACPICA)/compiler/prparserlex.c \ > + $(ACPICA)/compiler/prparserparse.c > + > +pkglib_LTLIBRARIES = libfwtsacpica.la > + > +libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0 > +libfwtsacpica_la_CPPFLAGS = $(AM_CPPFLAGS) > + > +# > +# fwts acpica library sources > +# > +libfwtsacpica_la_SOURCES = \ > + fwts_acpica.c \ > + osunixxf_munged.c \ > + dscontrol_munged.c \ > + $(ACPICA)/components/debugger/dbcmds.c \ > + $(ACPICA)/components/debugger/dbdisply.c \ > + $(ACPICA)/components/debugger/dbexec.c \ > + $(ACPICA)/components/debugger/dbfileio.c \ > + $(ACPICA)/components/debugger/dbhistry.c \ > + $(ACPICA)/components/debugger/dbinput.c \ > + $(ACPICA)/components/debugger/dbstats.c \ > + $(ACPICA)/components/debugger/dbobject.c \ > + $(ACPICA)/components/debugger/dbutils.c \ > + $(ACPICA)/components/debugger/dbxface.c \ > + $(ACPICA)/components/debugger/dbmethod.c \ > + $(ACPICA)/components/debugger/dbnames.c \ > + $(ACPICA)/components/debugger/dbconvert.c \ > + $(ACPICA)/components/debugger/dbtest.c \ > + $(ACPICA)/components/disassembler/dmbuffer.c \ > + $(ACPICA)/components/disassembler/dmcstyle.c \ > + $(ACPICA)/components/disassembler/dmnames.c \ > + $(ACPICA)/components/disassembler/dmopcode.c \ > + $(ACPICA)/components/disassembler/dmresrc.c \ > + $(ACPICA)/components/disassembler/dmresrcl.c \ > + $(ACPICA)/components/disassembler/dmresrcs.c \ > + $(ACPICA)/components/disassembler/dmutils.c \ > + $(ACPICA)/components/disassembler/dmwalk.c \ > + $(ACPICA)/components/disassembler/dmresrcl2.c \ > + $(ACPICA)/components/disassembler/dmdeferred.c \ > + $(ACPICA)/components/dispatcher/dsdebug.c \ > + $(ACPICA)/components/dispatcher/dsfield.c \ > + $(ACPICA)/components/dispatcher/dsinit.c \ > + $(ACPICA)/components/dispatcher/dsmethod.c \ > + $(ACPICA)/components/dispatcher/dsmthdat.c \ > + $(ACPICA)/components/dispatcher/dsobject.c \ > + $(ACPICA)/components/dispatcher/dspkginit.c \ > + $(ACPICA)/components/dispatcher/dsutils.c \ > + $(ACPICA)/components/dispatcher/dswexec.c \ > + $(ACPICA)/components/dispatcher/dswload.c \ > + $(ACPICA)/components/dispatcher/dswscope.c \ > + $(ACPICA)/components/dispatcher/dswstate.c \ > + $(ACPICA)/components/dispatcher/dsargs.c \ > + $(ACPICA)/components/dispatcher/dswload2.c \ > + $(ACPICA)/components/dispatcher/dsopcode.c \ > + $(ACPICA)/components/events/evevent.c \ > + $(ACPICA)/components/events/evgpe.c \ > + $(ACPICA)/components/events/evgpeblk.c \ > + $(ACPICA)/components/events/evgpeinit.c \ > + $(ACPICA)/components/events/evgpeutil.c \ > + $(ACPICA)/components/events/evxfgpe.c \ > + $(ACPICA)/components/events/evmisc.c \ > + $(ACPICA)/components/events/evregion.c \ > + $(ACPICA)/components/events/evrgnini.c \ > + $(ACPICA)/components/events/evsci.c \ > + $(ACPICA)/components/events/evxface.c \ > + $(ACPICA)/components/events/evxfevnt.c \ > + $(ACPICA)/components/events/evxfregn.c \ > + $(ACPICA)/components/events/evglock.c \ > + $(ACPICA)/components/events/evhandler.c \ > + $(ACPICA)/components/executer/exconcat.c \ > + $(ACPICA)/components/executer/exfield.c \ > + $(ACPICA)/components/executer/exfldio.c \ > + $(ACPICA)/components/executer/exmisc.c \ > + $(ACPICA)/components/executer/exmutex.c \ > + $(ACPICA)/components/executer/exnames.c \ > + $(ACPICA)/components/executer/exoparg1.c \ > + $(ACPICA)/components/executer/exoparg2.c \ > + $(ACPICA)/components/executer/exoparg3.c \ > + $(ACPICA)/components/executer/exoparg6.c \ > + $(ACPICA)/components/executer/exprep.c \ > + $(ACPICA)/components/executer/exregion.c \ > + $(ACPICA)/components/executer/exresnte.c \ > + $(ACPICA)/components/executer/exresolv.c \ > + $(ACPICA)/components/executer/exresop.c \ > + $(ACPICA)/components/executer/exserial.c \ > + $(ACPICA)/components/executer/exstore.c \ > + $(ACPICA)/components/executer/exstoren.c \ > + $(ACPICA)/components/executer/exstorob.c \ > + $(ACPICA)/components/executer/exsystem.c \ > + $(ACPICA)/components/executer/extrace.c \ > + $(ACPICA)/components/executer/exutils.c \ > + $(ACPICA)/components/executer/exconvrt.c \ > + $(ACPICA)/components/executer/excreate.c \ > + $(ACPICA)/components/executer/exdump.c \ > + $(ACPICA)/components/executer/exdebug.c \ > + $(ACPICA)/components/executer/exconfig.c \ > + $(ACPICA)/components/hardware/hwacpi.c \ > + $(ACPICA)/components/hardware/hwgpe.c \ > + $(ACPICA)/components/hardware/hwpci.c \ > + $(ACPICA)/components/hardware/hwregs.c \ > + $(ACPICA)/components/hardware/hwsleep.c \ > + $(ACPICA)/components/hardware/hwvalid.c \ > + $(ACPICA)/components/hardware/hwxface.c \ > + $(ACPICA)/components/hardware/hwxfsleep.c \ > + $(ACPICA)/components/hardware/hwesleep.c \ > + $(ACPICA)/components/namespace/nsaccess.c \ > + $(ACPICA)/components/namespace/nsalloc.c \ > + $(ACPICA)/components/namespace/nsdump.c \ > + $(ACPICA)/components/namespace/nsdumpdv.c \ > + $(ACPICA)/components/namespace/nseval.c \ > + $(ACPICA)/components/namespace/nsinit.c \ > + $(ACPICA)/components/namespace/nsload.c \ > + $(ACPICA)/components/namespace/nsnames.c \ > + $(ACPICA)/components/namespace/nsobject.c \ > + $(ACPICA)/components/namespace/nsparse.c \ > + $(ACPICA)/components/namespace/nspredef.c \ > + $(ACPICA)/components/namespace/nsrepair.c \ > + $(ACPICA)/components/namespace/nsrepair2.c \ > + $(ACPICA)/components/namespace/nssearch.c \ > + $(ACPICA)/components/namespace/nsutils.c \ > + $(ACPICA)/components/namespace/nswalk.c \ > + $(ACPICA)/components/namespace/nsxfeval.c \ > + $(ACPICA)/components/namespace/nsxfname.c \ > + $(ACPICA)/components/namespace/nsxfobj.c \ > + $(ACPICA)/components/namespace/nsconvert.c \ > + $(ACPICA)/components/namespace/nsprepkg.c \ > + $(ACPICA)/components/namespace/nsarguments.c \ > + $(ACPICA)/components/parser/psargs.c \ > + $(ACPICA)/components/parser/psloop.c \ > + $(ACPICA)/components/parser/psopcode.c \ > + $(ACPICA)/components/parser/psparse.c \ > + $(ACPICA)/components/parser/psscope.c \ > + $(ACPICA)/components/parser/pstree.c \ > + $(ACPICA)/components/parser/psutils.c \ > + $(ACPICA)/components/parser/pswalk.c \ > + $(ACPICA)/components/parser/psxface.c \ > + $(ACPICA)/components/parser/psopinfo.c \ > + $(ACPICA)/components/parser/psobject.c \ > + $(ACPICA)/components/resources/rsaddr.c \ > + $(ACPICA)/components/resources/rscalc.c \ > + $(ACPICA)/components/resources/rscreate.c \ > + $(ACPICA)/components/resources/rsdump.c \ > + $(ACPICA)/components/resources/rsio.c \ > + $(ACPICA)/components/resources/rsinfo.c \ > + $(ACPICA)/components/resources/rsirq.c \ > + $(ACPICA)/components/resources/rslist.c \ > + $(ACPICA)/components/resources/rsmemory.c \ > + $(ACPICA)/components/resources/rsmisc.c \ > + $(ACPICA)/components/resources/rsutils.c \ > + $(ACPICA)/components/resources/rsxface.c \ > + $(ACPICA)/components/resources/rsserial.c \ > + $(ACPICA)/components/resources/rsdumpinfo.c \ > + $(ACPICA)/components/tables/tbdata.c \ > + $(ACPICA)/components/tables/tbfadt.c \ > + $(ACPICA)/components/tables/tbfind.c \ > + $(ACPICA)/components/tables/tbinstal.c \ > + $(ACPICA)/components/tables/tbutils.c \ > + $(ACPICA)/components/tables/tbxface.c \ > + $(ACPICA)/components/tables/tbxfroot.c \ > + $(ACPICA)/components/tables/tbxfload.c \ > + $(ACPICA)/components/tables/tbprint.c \ > + $(ACPICA)/components/utilities/utaddress.c \ > + $(ACPICA)/components/utilities/utalloc.c \ > + $(ACPICA)/components/utilities/utascii.c \ > + $(ACPICA)/components/utilities/utcache.c \ > + $(ACPICA)/components/utilities/utcopy.c \ > + $(ACPICA)/components/utilities/utdebug.c \ > + $(ACPICA)/components/utilities/utdelete.c \ > + $(ACPICA)/components/utilities/uteval.c \ > + $(ACPICA)/components/utilities/utglobal.c \ > + $(ACPICA)/components/utilities/uthex.c \ > + $(ACPICA)/components/utilities/utids.c \ > + $(ACPICA)/components/utilities/utinit.c \ > + $(ACPICA)/components/utilities/utlock.c \ > + $(ACPICA)/components/utilities/utmath.c \ > + $(ACPICA)/components/utilities/utmisc.c \ > + $(ACPICA)/components/utilities/utmutex.c \ > + $(ACPICA)/components/utilities/utnonansi.c \ > + $(ACPICA)/components/utilities/utobject.c \ > + $(ACPICA)/components/utilities/utresdecode.c \ > + $(ACPICA)/components/utilities/utresrc.c \ > + $(ACPICA)/components/utilities/utstate.c \ > + $(ACPICA)/components/utilities/utstrtoul64.c \ > + $(ACPICA)/components/utilities/uttrack.c \ > + $(ACPICA)/components/utilities/utosi.c \ > + $(ACPICA)/components/utilities/utxferror.c \ > + $(ACPICA)/components/utilities/utxface.c \ > + $(ACPICA)/components/utilities/utdecode.c \ > + $(ACPICA)/components/utilities/utexcep.c \ > + $(ACPICA)/components/utilities/utpredef.c \ > + $(ACPICA)/components/utilities/utstring.c \ > + $(ACPICA)/components/utilities/utstrsuppt.c \ > + $(ACPICA)/components/utilities/utownerid.c \ > + $(ACPICA)/components/utilities/utxfinit.c \ > + $(ACPICA)/components/utilities/uterror.c \ > + $(ACPICA)/components/utilities/utbuffer.c \ > + $(ACPICA)/components/utilities/utuuid.c \ > + $(ACPICA)/common/acfileio.c \ > + $(ACPICA)/common/acgetline.c \ > + $(ACPICA)/common/ahids.c \ > + $(ACPICA)/common/cmfsize.c \ > + $(ACPICA)/common/ahtable.c \ > + $(ACPICA)/common/ahuuids.c \ > + $(ACPICA)/tools/acpiexec/aeinitfile.c \ > + $(ACPICA)/tools/acpiexec/aehandlers.c \ > + $(ACPICA)/tools/acpiexec/aeexception.c \ > + $(ACPICA)/tools/acpiexec/aeregion.c \ > + $(ACPICA)/tools/acpiexec/aeinstall.c \ > + $(ACPICA)/os_specific/service_layers/osgendbg.c > + > +libfwtsacpica_la_LIBADD = \ > + -L$(top_builddir)/src/lib/src -lfwts -lrt > + > diff --git a/src/acpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c > similarity index 100% > rename from src/acpica/fwts_acpica.c > rename to src/libfwtsacpica/fwts_acpica.c > diff --git a/src/libfwtsiasl/Makefile.am b/src/libfwtsiasl/Makefile.am > new file mode 100644 > index 00000000..37c6fcef > --- /dev/null > +++ b/src/libfwtsiasl/Makefile.am > @@ -0,0 +1,312 @@ > +# > +# Copyright (C) 2011-2019 Canonical, Ltd. > +# > +# This program is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public License > +# as published by the Free Software Foundation; either version 2 > +# of the License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > +# > + > +# > +# We need to build this as a separate shared library with the iasl functionality built in. We > +# just export the fwts_* interface. > +# > +AUTOMAKE_OPTIONS = subdir-objects > + > +ACPICA = $(top_srcdir)/src/acpica/source > + > +AM_CPPFLAGS = -Wall -Wstrict-prototypes \ > + -fno-strict-aliasing \ > + -D_LINUX \ > + -DACPI_ASL_COMPILER $(CFLAGS) \ > + -I$(ACPICA)/include \ > + -I$(ACPICA)/compiler > + > +AM_YFLAGS = -d > + > +# > +# Case in-sensitive scanning > +# > +AM_LFLAGS = -i > + > +ASL_PARSER = \ > + $(ACPICA)/compiler/aslcstyle.y \ > + $(ACPICA)/compiler/aslhelpers.y \ > + $(ACPICA)/compiler/aslparser.y \ > + $(ACPICA)/compiler/aslprimaries.y \ > + $(ACPICA)/compiler/aslresources.y \ > + $(ACPICA)/compiler/aslrules.y \ > + $(ACPICA)/compiler/aslsupport.y \ > + $(ACPICA)/compiler/asltokens.y \ > + $(ACPICA)/compiler/asltypes.y > + > +ASL_LEXER = > + $(ACPICA)/compiler/aslcompiler.l \ > + $(srcdir)/aslsupport.l \ > + $(srcdir)/aslcompiler.y.h > + > +$(srcdir)/aslcompiler.y: $(ASL_PARSER) > + m4 -P -I$(ACPICA)/compiler $(ACPICA)/compiler/aslparser.y > $@ > + > +$(srcdir)/aslcompilerlex.c: $(ASL_LEXER) > + ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(ACPICA)/compiler/aslcompiler.l > + > +.NOTPARALLEL: $(srcdir)/aslcompiler.c > +$(srcdir)/aslcompiler.c $(srcdir)/aslcompiler.y.h: $(srcdir)/aslcompiler.y > + ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ > + mv aslcompiler.tab.c aslcompiler.c > + mv aslcompiler.tab.h aslcompiler.y.h > + > +.NOTPARALLEL: $(srcdir)/dtparserlex.c > +$(srcdir)/dtparserlex.c $(srcdir)/dtparser.c $(srcdir)/dtparser.y.h: $(ACPICA)/compiler/dtparser.l $(ACPICA)/compiler/dtparser.y > + ${LEX} ${AM_LFLAGS} -PDtParser -o$(srcdir)/dtparserlex.c $< > + ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(ACPICA)/compiler/dtparser.y > + mv dtparser.tab.c dtparser.c > + mv dtparser.tab.h dtparser.y.h > + > +.NOTPARALLEL: $(srcdir)/prparserlex.c > +$(srcdir)/prparserlex.c $(srcdir)/prparser.c $(srcdir)/prparser.y.h: $(ACPICA)/compiler/prparser.l $(ACPICA)/compiler/prparser.y > + ${LEX} ${AM_LFLAGS} -PPrParser -o$(srcdir)/prparserlex.c $< > + ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(ACPICA)/compiler/prparser.y > + mv prparser.tab.c prparser.c > + mv prparser.tab.h prparser.y.h > + > +pkglib_LTLIBRARIES = libfwtsiasl.la > + > +BUILT_SOURCES = aslcompiler.y \ > + aslcompiler.y.h \ > + aslcompilerlex.c \ > + aslcompiler.c \ > + dtparser.y.h \ > + dtparserlex.c \ > + dtparser.c \ > + prparser.y.h \ > + prparserlex.c \ > + prparser.c > + > +# > +# Just export fwts specific API so we don't clash with core ACPICA library > +# > +libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -lpthread -version-info 1:0:0 > + > +CLEANFILES = $(BUILT_SOURCES) > + > +libfwtsiasl_la_CPPFLAGS = $(AM_CPPFLAGS) > +libfwtsiasl_la_SOURCES = \ > + fwts_iasl_interface.c \ > + aslcompilerlex.c \ > + aslcompiler.c \ > + dtparserlex.c \ > + dtparser.c \ > + prparserlex.c \ > + prparser.c \ > + $(ACPICA)/common/adisasm.c \ > + $(ACPICA)/common/acfileio.c \ > + $(ACPICA)/common/adfile.c \ > + $(ACPICA)/common/adwalk.c \ > + $(ACPICA)/common/ahids.c \ > + $(ACPICA)/common/ahpredef.c \ > + $(ACPICA)/common/ahtable.c \ > + $(ACPICA)/common/ahuuids.c \ > + $(ACPICA)/compiler/aslallocate.c \ > + $(ACPICA)/compiler/aslanalyze.c \ > + $(ACPICA)/compiler/aslascii.c \ > + $(ACPICA)/compiler/aslbtypes.c \ > + $(ACPICA)/compiler/aslcache.c \ > + $(ACPICA)/compiler/aslcodegen.c \ > + $(ACPICA)/compiler/aslcompile.c \ > + $(ACPICA)/compiler/asldebug.c \ > + $(ACPICA)/compiler/aslerror.c \ > + $(ACPICA)/compiler/aslexternal.c \ > + $(ACPICA)/compiler/aslfiles.c \ > + $(ACPICA)/compiler/aslfileio.c \ > + $(ACPICA)/compiler/aslfold.c \ > + $(ACPICA)/compiler/aslhelp.c \ > + $(ACPICA)/compiler/aslhex.c \ > + $(ACPICA)/compiler/asllength.c \ > + $(ACPICA)/compiler/asllisting.c \ > + $(ACPICA)/compiler/asllistsup.c \ > + $(ACPICA)/compiler/aslload.c \ > + $(ACPICA)/compiler/asllookup.c \ > + $(ACPICA)/compiler/aslmain.c \ > + $(ACPICA)/compiler/aslmap.c \ > + $(ACPICA)/compiler/aslmapenter.c \ > + $(ACPICA)/compiler/aslmapoutput.c \ > + $(ACPICA)/compiler/aslmaputils.c \ > + $(ACPICA)/compiler/aslmessages.c \ > + $(ACPICA)/compiler/aslmethod.c \ > + $(ACPICA)/compiler/aslnamesp.c \ > + $(ACPICA)/compiler/asloffset.c \ > + $(ACPICA)/compiler/aslopcodes.c \ > + $(ACPICA)/compiler/asloperands.c \ > + $(ACPICA)/compiler/aslopt.c \ > + $(ACPICA)/compiler/asloptions.c \ > + $(ACPICA)/compiler/aslparseop.c \ > + $(ACPICA)/compiler/aslpredef.c \ > + $(ACPICA)/compiler/aslprepkg.c \ > + $(ACPICA)/compiler/aslprintf.c \ > + $(ACPICA)/compiler/aslprune.c \ > + $(ACPICA)/compiler/aslresource.c \ > + $(ACPICA)/compiler/aslrestype1.c \ > + $(ACPICA)/compiler/aslrestype1i.c \ > + $(ACPICA)/compiler/aslrestype2.c \ > + $(ACPICA)/compiler/aslrestype2d.c \ > + $(ACPICA)/compiler/aslrestype2e.c \ > + $(ACPICA)/compiler/aslrestype2q.c \ > + $(ACPICA)/compiler/aslrestype2s.c \ > + $(ACPICA)/compiler/aslrestype2w.c \ > + $(ACPICA)/compiler/aslstartup.c \ > + $(ACPICA)/compiler/aslstubs.c \ > + $(ACPICA)/compiler/aslpld.c \ > + $(ACPICA)/compiler/asltransform.c \ > + $(ACPICA)/compiler/asltree.c \ > + $(ACPICA)/compiler/aslutils.c \ > + $(ACPICA)/compiler/asluuid.c \ > + $(ACPICA)/compiler/aslwalks.c \ > + $(ACPICA)/compiler/aslxref.c \ > + $(ACPICA)/compiler/aslxrefout.c \ > + $(ACPICA)/compiler/cvcompiler.c \ > + $(ACPICA)/compiler/cvdisasm.c \ > + $(ACPICA)/compiler/cvparser.c \ > + $(ACPICA)/common/cmfsize.c \ > + $(ACPICA)/components/debugger/dbfileio.c \ > + $(ACPICA)/components/disassembler/dmbuffer.c \ > + $(ACPICA)/components/disassembler/dmcstyle.c \ > + $(ACPICA)/components/disassembler/dmdeferred.c \ > + $(ACPICA)/common/dmextern.c \ > + $(ACPICA)/components/disassembler/dmnames.c \ > + $(ACPICA)/components/disassembler/dmopcode.c \ > + $(ACPICA)/components/disassembler/dmresrc.c \ > + $(ACPICA)/components/disassembler/dmresrcl.c \ > + $(ACPICA)/components/disassembler/dmresrcl2.c \ > + $(ACPICA)/components/disassembler/dmresrcs.c \ > + $(ACPICA)/common/dmrestag.c \ > + $(ACPICA)/common/dmswitch.c \ > + $(ACPICA)/common/dmtable.c \ > + $(ACPICA)/common/dmtables.c \ > + $(ACPICA)/common/dmtbdump.c \ > + $(ACPICA)/common/dmtbdump1.c \ > + $(ACPICA)/common/dmtbdump2.c \ > + $(ACPICA)/common/dmtbdump3.c \ > + $(ACPICA)/common/dmtbinfo.c \ > + $(ACPICA)/common/dmtbinfo1.c \ > + $(ACPICA)/common/dmtbinfo2.c \ > + $(ACPICA)/common/dmtbinfo3.c \ > + $(ACPICA)/components/disassembler/dmutils.c \ > + $(ACPICA)/components/disassembler/dmwalk.c \ > + $(ACPICA)/components/dispatcher/dsargs.c \ > + $(ACPICA)/components/dispatcher/dscontrol.c \ > + $(ACPICA)/components/dispatcher/dsfield.c \ > + $(ACPICA)/components/dispatcher/dsobject.c \ > + $(ACPICA)/components/dispatcher/dsopcode.c \ > + $(ACPICA)/components/dispatcher/dspkginit.c \ > + $(ACPICA)/components/dispatcher/dsutils.c \ > + $(ACPICA)/components/dispatcher/dswexec.c \ > + $(ACPICA)/components/dispatcher/dswload.c \ > + $(ACPICA)/components/dispatcher/dswload2.c \ > + $(ACPICA)/components/dispatcher/dswscope.c \ > + $(ACPICA)/components/dispatcher/dswstate.c \ > + $(ACPICA)/compiler/dtcompile.c \ > + $(ACPICA)/compiler/dtexpress.c \ > + $(ACPICA)/compiler/dtfield.c \ > + $(ACPICA)/compiler/dtio.c \ > + $(ACPICA)/compiler/dtsubtable.c \ > + $(ACPICA)/compiler/dttable.c \ > + $(ACPICA)/compiler/dttable1.c \ > + $(ACPICA)/compiler/dttable2.c \ > + $(ACPICA)/compiler/dttemplate.c \ > + $(ACPICA)/compiler/dtutils.c \ > + $(ACPICA)/components/executer/exconcat.c \ > + $(ACPICA)/components/executer/exconvrt.c \ > + $(ACPICA)/components/executer/excreate.c \ > + $(ACPICA)/components/executer/exdump.c \ > + $(ACPICA)/components/executer/exmisc.c \ > + $(ACPICA)/components/executer/exmutex.c \ > + $(ACPICA)/components/executer/exnames.c \ > + $(ACPICA)/components/executer/exoparg1.c \ > + $(ACPICA)/components/executer/exoparg2.c \ > + $(ACPICA)/components/executer/exoparg3.c \ > + $(ACPICA)/components/executer/exoparg6.c \ > + $(ACPICA)/components/executer/exprep.c \ > + $(ACPICA)/components/executer/exregion.c \ > + $(ACPICA)/components/executer/exresnte.c \ > + $(ACPICA)/components/executer/exresolv.c \ > + $(ACPICA)/components/executer/exresop.c \ > + $(ACPICA)/components/executer/exstore.c \ > + $(ACPICA)/components/executer/exstoren.c \ > + $(ACPICA)/components/executer/exstorob.c \ > + $(ACPICA)/components/executer/exsystem.c \ > + $(ACPICA)/components/executer/exutils.c \ > + $(ACPICA)/common/getopt.c \ > + $(ACPICA)/components/namespace/nsaccess.c \ > + $(ACPICA)/components/namespace/nsalloc.c \ > + $(ACPICA)/components/namespace/nsdump.c \ > + $(ACPICA)/components/namespace/nsnames.c \ > + $(ACPICA)/components/namespace/nsobject.c \ > + $(ACPICA)/components/namespace/nsparse.c \ > + $(ACPICA)/components/namespace/nssearch.c \ > + $(ACPICA)/components/namespace/nsutils.c \ > + $(ACPICA)/components/namespace/nswalk.c \ > + $(ACPICA)/components/namespace/nsxfobj.c \ > + $(ACPICA)/os_specific/service_layers/osunixxf.c \ > + $(ACPICA)/compiler/prexpress.c \ > + $(ACPICA)/compiler/prmacros.c \ > + $(ACPICA)/compiler/prscan.c \ > + $(ACPICA)/compiler/prutils.c \ > + $(ACPICA)/components/parser/psargs.c \ > + $(ACPICA)/components/parser/psloop.c \ > + $(ACPICA)/components/parser/psobject.c \ > + $(ACPICA)/components/parser/psopcode.c \ > + $(ACPICA)/components/parser/psopinfo.c \ > + $(ACPICA)/components/parser/psparse.c \ > + $(ACPICA)/components/parser/psscope.c \ > + $(ACPICA)/components/parser/pstree.c \ > + $(ACPICA)/components/parser/psutils.c \ > + $(ACPICA)/components/parser/pswalk.c \ > + $(ACPICA)/components/tables/tbdata.c \ > + $(ACPICA)/components/tables/tbfadt.c \ > + $(ACPICA)/components/tables/tbinstal.c \ > + $(ACPICA)/components/tables/tbprint.c \ > + $(ACPICA)/components/tables/tbutils.c \ > + $(ACPICA)/components/tables/tbxface.c \ > + $(ACPICA)/components/tables/tbxfload.c \ > + $(ACPICA)/components/utilities/utaddress.c \ > + $(ACPICA)/components/utilities/utalloc.c \ > + $(ACPICA)/components/utilities/utascii.c \ > + $(ACPICA)/components/utilities/utbuffer.c \ > + $(ACPICA)/components/utilities/utcache.c \ > + $(ACPICA)/components/utilities/utcopy.c \ > + $(ACPICA)/components/utilities/utdebug.c \ > + $(ACPICA)/components/utilities/utdecode.c \ > + $(ACPICA)/components/utilities/utdelete.c \ > + $(ACPICA)/components/utilities/uterror.c \ > + $(ACPICA)/components/utilities/utexcep.c \ > + $(ACPICA)/components/utilities/utglobal.c \ > + $(ACPICA)/components/utilities/uthex.c \ > + $(ACPICA)/components/utilities/utinit.c \ > + $(ACPICA)/components/utilities/utlock.c \ > + $(ACPICA)/components/utilities/utmath.c \ > + $(ACPICA)/components/utilities/utmisc.c \ > + $(ACPICA)/components/utilities/utmutex.c \ > + $(ACPICA)/components/utilities/utnonansi.c \ > + $(ACPICA)/components/utilities/utobject.c \ > + $(ACPICA)/components/utilities/utownerid.c \ > + $(ACPICA)/components/utilities/utpredef.c \ > + $(ACPICA)/components/utilities/utresdecode.c \ > + $(ACPICA)/components/utilities/utresrc.c \ > + $(ACPICA)/components/utilities/utstate.c \ > + $(ACPICA)/components/utilities/utstrtoul64.c \ > + $(ACPICA)/components/utilities/utstrsuppt.c \ > + $(ACPICA)/components/utilities/utstring.c \ > + $(ACPICA)/components/utilities/utuuid.c \ > + $(ACPICA)/components/utilities/utxface.c \ > + $(ACPICA)/components/utilities/utxferror.c > diff --git a/src/acpica/source/compiler/fwts_iasl_interface.c b/src/libfwtsiasl/fwts_iasl_interface.c > similarity index 100% > rename from src/acpica/source/compiler/fwts_iasl_interface.c > rename to src/libfwtsiasl/fwts_iasl_interface.c > diff --git a/src/acpica/source/compiler/fwts_iasl_interface.h b/src/libfwtsiasl/fwts_iasl_interface.h > similarity index 100% > rename from src/acpica/source/compiler/fwts_iasl_interface.h > rename to src/libfwtsiasl/fwts_iasl_interface.h > Acked-by: Alex Hung <alex.hung@canonical.com>
On 6/19/19 4:19 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Currently these libraries have been built in various places > in the acpica source trees which is messy to say the least. > Clean this up by building the librariers in their own > directories. I've been wanting to do this for ~8 years, > finally got around to it. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > configure.ac | 4 +- > src/Makefile.am | 11 +- > src/acpica/Makefile.am | 288 ---------------- > src/acpica/source/compiler/Makefile.am | 306 ----------------- > src/lib/src/Makefile.am | 9 +- > src/libfwtsacpica/Makefile.am | 289 ++++++++++++++++ > src/{acpica => libfwtsacpica}/fwts_acpica.c | 0 > src/libfwtsiasl/Makefile.am | 312 ++++++++++++++++++ > .../fwts_iasl_interface.c | 0 > .../fwts_iasl_interface.h | 0 > 10 files changed, 616 insertions(+), 603 deletions(-) > delete mode 100644 src/acpica/Makefile.am > delete mode 100644 src/acpica/source/compiler/Makefile.am > create mode 100644 src/libfwtsacpica/Makefile.am > rename src/{acpica => libfwtsacpica}/fwts_acpica.c (100%) > create mode 100644 src/libfwtsiasl/Makefile.am > rename src/{acpica/source/compiler => libfwtsiasl}/fwts_iasl_interface.c (100%) > rename src/{acpica/source/compiler => libfwtsiasl}/fwts_iasl_interface.h (100%) > > diff --git a/configure.ac b/configure.ac > index 0109d644..39a445cd 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -101,8 +101,8 @@ > AC_CONFIG_FILES([ > Makefile > src/Makefile > - src/acpica/source/compiler/Makefile > - src/acpica/Makefile > + src/libfwtsiasl/Makefile > + src/libfwtsacpica/Makefile > src/lib/Makefile > src/lib/src/Makefile > src/utilities/Makefile > diff --git a/src/Makefile.am b/src/Makefile.am > index 62c9ba8f..904fc020 100644 > --- a/src/Makefile.am > +++ b/src/Makefile.am > @@ -4,7 +4,7 @@ > # 3. acpica > # ... because the libs in this bundled acpica/ depend on lib/ (libfwts.so), > # but libfwts.so depends on libraries produced by acpica/source/compiler. > -SUBDIRS = acpica/source/compiler lib acpica > +SUBDIRS = libfwtsiasl lib libfwtsacpica > > AM_CPPFLAGS = \ > -I$(top_srcdir)/src/lib/include \ > @@ -197,7 +197,12 @@ fwts_SOURCES = main.c \ > fwts_LDFLAGS = -lm -lbsd `pkg-config --libs glib-2.0 gio-2.0` > > fwts_LDADD = \ > - -L$(top_builddir)/src/acpica -lfwtsacpica \ > - -Llib/src -lfwts > + -L$(top_builddir)/src \ > + -L$(top_builddir)/src/acpica \ > + -L$(top_builddir)/src/libfwtsiasl \ > + -L$(top_builddir)/src/libfwtsacpica \ > + -L$(top_builddir)/src/lib/src \ > + -lfwtsacpica \ > + -lfwts > > man_MANS = ../doc/fwts.1 ../doc/fwts-collect.1 ../doc/fwts-frontend-text.1 > diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am > deleted file mode 100644 > index 03dd9820..00000000 > --- a/src/acpica/Makefile.am > +++ /dev/null > @@ -1,288 +0,0 @@ > -# > -# Copyright (C) 2010-2019 Canonical, Ltd. > -# > -# This program is free software; you can redistribute it and/or > -# modify it under the terms of the GNU General Public License > -# as published by the Free Software Foundation; either version 2 > -# of the License, or (at your option) any later version. > -# > -# This program is distributed in the hope that it will be useful, > -# but WITHOUT ANY WARRANTY; without even the implied warranty of > -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > -# GNU General Public License for more details. > -# > -# You should have received a copy of the GNU General Public License > -# along with this program; if not, write to the Free Software > -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > -# > - > -# Nb. the top-level Makefile builds source/compiler for us now... > -## SUBDIRS = source/compiler > - > -# > -# -DACPI_EXEC_APP is specific to making ACPICA for the fwts method test > -# > -AM_CPPFLAGS = \ > - -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP \ > - -I$(top_srcdir)/src/lib/include \ > - -I$(srcdir)/source/include \ > - -I$(srcdir)/source/tools/acpiexec \ > - `pkg-config --silence-errors --cflags json` \ > - `pkg-config --silence-errors --cflags json-c` \ > - -Wall -fno-strict-aliasing \ > - -Wno-address-of-packed-member > - > -# > -# We rename some of the functions so we can override them in fwts. This > -# is a hack, I feel dirty now. > -# > -osunixxf_munged.c: $(srcdir)/source/os_specific/service_layers/osunixxf.c > - cat $^ | \ > - sed 's/^AcpiOsPrintf/__AcpiOsPrintf/' | \ > - sed 's/^AcpiOsReadPort/__AcpiOsReadPort/' | \ > - sed 's/^AcpiOsReadPciConfiguration/__AcpiOsReadPciConfiguration/' | \ > - sed 's/^AcpiOsSignalSemaphore/__AcpiOsSignalSemaphore/' | \ > - sed 's/^AcpiOsWaitSemaphore/__AcpiOsWaitSemaphore/' | \ > - sed 's/^AcpiOsCreateSemaphore/__AcpiOsCreateSemaphore/' | \ > - sed 's/^AcpiOsDeleteSemaphore/__AcpiOsDeleteSemaphore/' | \ > - sed 's/^AcpiOsVprintf/__AcpiOsVprintf/' | \ > - sed 's/^AcpiOsSignal/__AcpiOsSignal/' | \ > - sed 's/^AcpiOsSleep/__AcpiOsSleep/' | \ > - sed 's/^AcpiOsExecute/__AcpiOsExecute/' \ > - > $@ > -# > -# Force maximum loop iterations to be just 128 instead of 0xffff > -# because we really don't want to wait until the sun turns into > -# a lump of coal before we complete a blocked operation > -# > -dscontrol_munged.c: $(srcdir)/source/components/dispatcher/dscontrol.c > - cat $^ | \ > - sed 's/ACPI_MAX_LOOP_ITERATIONS/0x0080/' \ > - > $@ > - > -BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c > - > -# > -# Source files that are generated on-the fly and need cleaning > -# > -CLEANFILES = osunixxf_munged.c \ > - dscontrol_munged.c \ > - source/compiler/aslcompiler.output \ > - source/compiler/dtparser.output \ > - source/compiler/dtparser.y.h \ > - source/compiler/prparser.output \ > - source/compiler/prparser.y.h \ > - source/compiler/prparserlex.c \ > - source/compiler/prparserparse.c > - > -pkglib_LTLIBRARIES = libfwtsacpica.la > - > -libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0 > -libfwtsacpica_la_CPPFLAGS = $(AM_CPPFLAGS) > - > -# > -# fwts acpica library sources > -# > -libfwtsacpica_la_SOURCES = \ > - fwts_acpica.c \ > - osunixxf_munged.c \ > - dscontrol_munged.c \ > - source/components/debugger/dbcmds.c \ > - source/components/debugger/dbdisply.c \ > - source/components/debugger/dbexec.c \ > - source/components/debugger/dbfileio.c \ > - source/components/debugger/dbhistry.c \ > - source/components/debugger/dbinput.c \ > - source/components/debugger/dbstats.c \ > - source/components/debugger/dbobject.c \ > - source/components/debugger/dbutils.c \ > - source/components/debugger/dbxface.c \ > - source/components/debugger/dbmethod.c \ > - source/components/debugger/dbnames.c \ > - source/components/debugger/dbconvert.c \ > - source/components/debugger/dbtest.c \ > - source/components/disassembler/dmbuffer.c \ > - source/components/disassembler/dmcstyle.c \ > - source/components/disassembler/dmnames.c \ > - source/components/disassembler/dmopcode.c \ > - source/components/disassembler/dmresrc.c \ > - source/components/disassembler/dmresrcl.c \ > - source/components/disassembler/dmresrcs.c \ > - source/components/disassembler/dmutils.c \ > - source/components/disassembler/dmwalk.c \ > - source/components/disassembler/dmresrcl2.c \ > - source/components/disassembler/dmdeferred.c \ > - source/components/dispatcher/dsdebug.c \ > - source/components/dispatcher/dsfield.c \ > - source/components/dispatcher/dsinit.c \ > - source/components/dispatcher/dsmethod.c \ > - source/components/dispatcher/dsmthdat.c \ > - source/components/dispatcher/dsobject.c \ > - source/components/dispatcher/dspkginit.c \ > - source/components/dispatcher/dsutils.c \ > - source/components/dispatcher/dswexec.c \ > - source/components/dispatcher/dswload.c \ > - source/components/dispatcher/dswscope.c \ > - source/components/dispatcher/dswstate.c \ > - source/components/dispatcher/dsargs.c \ > - source/components/dispatcher/dswload2.c \ > - source/components/dispatcher/dsopcode.c \ > - source/components/events/evevent.c \ > - source/components/events/evgpe.c \ > - source/components/events/evgpeblk.c \ > - source/components/events/evgpeinit.c \ > - source/components/events/evgpeutil.c \ > - source/components/events/evxfgpe.c \ > - source/components/events/evmisc.c \ > - source/components/events/evregion.c \ > - source/components/events/evrgnini.c \ > - source/components/events/evsci.c \ > - source/components/events/evxface.c \ > - source/components/events/evxfevnt.c \ > - source/components/events/evxfregn.c \ > - source/components/events/evglock.c \ > - source/components/events/evhandler.c \ > - source/components/executer/exconcat.c \ > - source/components/executer/exfield.c \ > - source/components/executer/exfldio.c \ > - source/components/executer/exmisc.c \ > - source/components/executer/exmutex.c \ > - source/components/executer/exnames.c \ > - source/components/executer/exoparg1.c \ > - source/components/executer/exoparg2.c \ > - source/components/executer/exoparg3.c \ > - source/components/executer/exoparg6.c \ > - source/components/executer/exprep.c \ > - source/components/executer/exregion.c \ > - source/components/executer/exresnte.c \ > - source/components/executer/exresolv.c \ > - source/components/executer/exresop.c \ > - source/components/executer/exserial.c \ > - source/components/executer/exstore.c \ > - source/components/executer/exstoren.c \ > - source/components/executer/exstorob.c \ > - source/components/executer/exsystem.c \ > - source/components/executer/extrace.c \ > - source/components/executer/exutils.c \ > - source/components/executer/exconvrt.c \ > - source/components/executer/excreate.c \ > - source/components/executer/exdump.c \ > - source/components/executer/exdebug.c \ > - source/components/executer/exconfig.c \ > - source/components/hardware/hwacpi.c \ > - source/components/hardware/hwgpe.c \ > - source/components/hardware/hwpci.c \ > - source/components/hardware/hwregs.c \ > - source/components/hardware/hwsleep.c \ > - source/components/hardware/hwvalid.c \ > - source/components/hardware/hwxface.c \ > - source/components/hardware/hwxfsleep.c \ > - source/components/hardware/hwesleep.c \ > - source/components/namespace/nsaccess.c \ > - source/components/namespace/nsalloc.c \ > - source/components/namespace/nsdump.c \ > - source/components/namespace/nsdumpdv.c \ > - source/components/namespace/nseval.c \ > - source/components/namespace/nsinit.c \ > - source/components/namespace/nsload.c \ > - source/components/namespace/nsnames.c \ > - source/components/namespace/nsobject.c \ > - source/components/namespace/nsparse.c \ > - source/components/namespace/nspredef.c \ > - source/components/namespace/nsrepair.c \ > - source/components/namespace/nsrepair2.c \ > - source/components/namespace/nssearch.c \ > - source/components/namespace/nsutils.c \ > - source/components/namespace/nswalk.c \ > - source/components/namespace/nsxfeval.c \ > - source/components/namespace/nsxfname.c \ > - source/components/namespace/nsxfobj.c \ > - source/components/namespace/nsconvert.c \ > - source/components/namespace/nsprepkg.c \ > - source/components/namespace/nsarguments.c \ > - source/components/parser/psargs.c \ > - source/components/parser/psloop.c \ > - source/components/parser/psopcode.c \ > - source/components/parser/psparse.c \ > - source/components/parser/psscope.c \ > - source/components/parser/pstree.c \ > - source/components/parser/psutils.c \ > - source/components/parser/pswalk.c \ > - source/components/parser/psxface.c \ > - source/components/parser/psopinfo.c \ > - source/components/parser/psobject.c \ > - source/components/resources/rsaddr.c \ > - source/components/resources/rscalc.c \ > - source/components/resources/rscreate.c \ > - source/components/resources/rsdump.c \ > - source/components/resources/rsio.c \ > - source/components/resources/rsinfo.c \ > - source/components/resources/rsirq.c \ > - source/components/resources/rslist.c \ > - source/components/resources/rsmemory.c \ > - source/components/resources/rsmisc.c \ > - source/components/resources/rsutils.c \ > - source/components/resources/rsxface.c \ > - source/components/resources/rsserial.c \ > - source/components/resources/rsdumpinfo.c \ > - source/components/tables/tbdata.c \ > - source/components/tables/tbfadt.c \ > - source/components/tables/tbfind.c \ > - source/components/tables/tbinstal.c \ > - source/components/tables/tbutils.c \ > - source/components/tables/tbxface.c \ > - source/components/tables/tbxfroot.c \ > - source/components/tables/tbxfload.c \ > - source/components/tables/tbprint.c \ > - source/components/utilities/utaddress.c \ > - source/components/utilities/utalloc.c \ > - source/components/utilities/utascii.c \ > - source/components/utilities/utcache.c \ > - source/components/utilities/utcopy.c \ > - source/components/utilities/utdebug.c \ > - source/components/utilities/utdelete.c \ > - source/components/utilities/uteval.c \ > - source/components/utilities/utglobal.c \ > - source/components/utilities/uthex.c \ > - source/components/utilities/utids.c \ > - source/components/utilities/utinit.c \ > - source/components/utilities/utlock.c \ > - source/components/utilities/utmath.c \ > - source/components/utilities/utmisc.c \ > - source/components/utilities/utmutex.c \ > - source/components/utilities/utnonansi.c \ > - source/components/utilities/utobject.c \ > - source/components/utilities/utresdecode.c \ > - source/components/utilities/utresrc.c \ > - source/components/utilities/utstate.c \ > - source/components/utilities/utstrtoul64.c \ > - source/components/utilities/uttrack.c \ > - source/components/utilities/utosi.c \ > - source/components/utilities/utxferror.c \ > - source/components/utilities/utxface.c \ > - source/components/utilities/utdecode.c \ > - source/components/utilities/utexcep.c \ > - source/components/utilities/utpredef.c \ > - source/components/utilities/utstring.c \ > - source/components/utilities/utstrsuppt.c \ > - source/components/utilities/utownerid.c \ > - source/components/utilities/utxfinit.c \ > - source/components/utilities/uterror.c \ > - source/components/utilities/utbuffer.c \ > - source/components/utilities/utuuid.c \ > - source/common/acfileio.c \ > - source/common/acgetline.c \ > - source/common/ahids.c \ > - source/common/cmfsize.c \ > - source/common/ahtable.c \ > - source/common/ahuuids.c \ > - source/tools/acpiexec/aeinitfile.c \ > - source/tools/acpiexec/aehandlers.c \ > - source/tools/acpiexec/aeexception.c \ > - source/tools/acpiexec/aeregion.c \ > - source/tools/acpiexec/aeinstall.c \ > - source/os_specific/service_layers/osgendbg.c > - > -libfwtsacpica_la_LIBADD = \ > - -L$(top_builddir)/src/lib/src -lfwts -lrt > - > diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am > deleted file mode 100644 > index b237b47c..00000000 > --- a/src/acpica/source/compiler/Makefile.am > +++ /dev/null > @@ -1,306 +0,0 @@ > -# > -# Copyright (C) 2011-2019 Canonical, Ltd. > -# > -# This program is free software; you can redistribute it and/or > -# modify it under the terms of the GNU General Public License > -# as published by the Free Software Foundation; either version 2 > -# of the License, or (at your option) any later version. > -# > -# This program is distributed in the hope that it will be useful, > -# but WITHOUT ANY WARRANTY; without even the implied warranty of > -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > -# GNU General Public License for more details. > -# > -# You should have received a copy of the GNU General Public License > -# along with this program; if not, write to the Free Software > -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > -# > - > -# > -# We need to build this as a separate shared library with the iasl functionality built in. We > -# just export the fwts_* interface. > -# > -AUTOMAKE_OPTIONS = subdir-objects > - > -AM_CPPFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -D_LINUX \ > - -DACPI_ASL_COMPILER $(CFLAGS) -I$(top_srcdir)/src/acpica/source/include > - > -AM_YFLAGS = -d > - > -# > -# Case in-sensitive scanning > -# > -AM_LFLAGS = -i > - > -ASL_PARSER = \ > - $(srcdir)/aslcstyle.y \ > - $(srcdir)/aslhelpers.y \ > - $(srcdir)/aslparser.y \ > - $(srcdir)/aslprimaries.y \ > - $(srcdir)/aslresources.y \ > - $(srcdir)/aslrules.y \ > - $(srcdir)/aslsupport.y \ > - $(srcdir)/asltokens.y \ > - $(srcdir)/asltypes.y > - > -ASL_LEXER = > - $(srcdir)/aslcompiler.l \ > - $(srcdir)/aslsupport.l \ > - $(srcdir)/aslcompiler.y.h > - > -$(srcdir)/aslcompiler.y: $(ASL_PARSER) > - m4 -P -I$(srcdir) $(srcdir)/aslparser.y > $@ > - > -$(srcdir)/aslcompilerlex.c: $(ASL_LEXER) > - ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(srcdir)/aslcompiler.l > - > -.NOTPARALLEL: $(srcdir)/aslcompiler.c > -$(srcdir)/aslcompiler.c $(srcdir)/aslcompiler.y.h: $(srcdir)/aslcompiler.y > - ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ > - mv aslcompiler.tab.c aslcompiler.c > - mv aslcompiler.tab.h aslcompiler.y.h > - > -.NOTPARALLEL: $(srcdir)/dtparserlex.c > -$(srcdir)/dtparserlex.c $(srcdir)/dtparser.c $(srcdir)/dtparser.y.h: $(srcdir)/dtparser.l $(srcdir)/dtparser.y > - ${LEX} ${AM_LFLAGS} -PDtParser -o$(srcdir)/dtparserlex.c $< > - ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(srcdir)/dtparser.y > - mv dtparser.tab.c dtparser.c > - mv dtparser.tab.h dtparser.y.h > - > -.NOTPARALLEL: $(srcdir)/prparserlex.c > -$(srcdir)/prparserlex.c $(srcdir)/prparser.c $(srcdir)/prparser.y.h: $(srcdir)/prparser.l $(srcdir)/prparser.y > - ${LEX} ${AM_LFLAGS} -PPrParser -o$(srcdir)/prparserlex.c $< > - ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(srcdir)/prparser.y > - mv prparser.tab.c prparser.c > - mv prparser.tab.h prparser.y.h > - > -pkglib_LTLIBRARIES = libfwtsiasl.la > - > -BUILT_SOURCES = aslcompiler.y \ > - aslcompiler.y.h \ > - aslcompilerlex.c \ > - aslcompiler.c \ > - dtparser.y.h \ > - dtparserlex.c \ > - dtparser.c \ > - prparser.y.h \ > - prparserlex.c \ > - prparser.c > - > -# > -# Just export fwts specific API so we don't clash with core ACPICA library > -# > -libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -lpthread -version-info 1:0:0 > - > -CLEANFILES = $(BUILT_SOURCES) > - > -libfwtsiasl_la_CPPFLAGS = $(AM_CPPFLAGS) > -libfwtsiasl_la_SOURCES = \ > - fwts_iasl_interface.c \ > - aslcompilerlex.c \ > - aslcompiler.c \ > - dtparserlex.c \ > - dtparser.c \ > - prparserlex.c \ > - prparser.c \ > - ../common/adisasm.c \ > - ../common/acfileio.c \ > - ../common/adfile.c \ > - ../common/adwalk.c \ > - ../common/ahids.c \ > - ../common/ahpredef.c \ > - ../common/ahtable.c \ > - ../common/ahuuids.c \ > - ../compiler/aslallocate.c \ > - ../compiler/aslanalyze.c \ > - ../compiler/aslascii.c \ > - ../compiler/aslbtypes.c \ > - ../compiler/aslcache.c \ > - ../compiler/aslcodegen.c \ > - ../compiler/aslcompile.c \ > - ../compiler/asldebug.c \ > - ../compiler/aslerror.c \ > - ../compiler/aslexternal.c \ > - ../compiler/aslfiles.c \ > - ../compiler/aslfileio.c \ > - ../compiler/aslfold.c \ > - ../compiler/aslhelp.c \ > - ../compiler/aslhex.c \ > - ../compiler/asllength.c \ > - ../compiler/asllisting.c \ > - ../compiler/asllistsup.c \ > - ../compiler/aslload.c \ > - ../compiler/asllookup.c \ > - ../compiler/aslmain.c \ > - ../compiler/aslmap.c \ > - ../compiler/aslmapenter.c \ > - ../compiler/aslmapoutput.c \ > - ../compiler/aslmaputils.c \ > - ../compiler/aslmessages.c \ > - ../compiler/aslmethod.c \ > - ../compiler/aslnamesp.c \ > - ../compiler/asloffset.c \ > - ../compiler/aslopcodes.c \ > - ../compiler/asloperands.c \ > - ../compiler/aslopt.c \ > - ../compiler/asloptions.c \ > - ../compiler/aslparseop.c \ > - ../compiler/aslpredef.c \ > - ../compiler/aslprepkg.c \ > - ../compiler/aslprintf.c \ > - ../compiler/aslprune.c \ > - ../compiler/aslresource.c \ > - ../compiler/aslrestype1.c \ > - ../compiler/aslrestype1i.c \ > - ../compiler/aslrestype2.c \ > - ../compiler/aslrestype2d.c \ > - ../compiler/aslrestype2e.c \ > - ../compiler/aslrestype2q.c \ > - ../compiler/aslrestype2s.c \ > - ../compiler/aslrestype2w.c \ > - ../compiler/aslstartup.c \ > - ../compiler/aslstubs.c \ > - ../compiler/aslpld.c \ > - ../compiler/asltransform.c \ > - ../compiler/asltree.c \ > - ../compiler/aslutils.c \ > - ../compiler/asluuid.c \ > - ../compiler/aslwalks.c \ > - ../compiler/aslxref.c \ > - ../compiler/aslxrefout.c \ > - ../compiler/cvcompiler.c \ > - ../compiler/cvdisasm.c \ > - ../compiler/cvparser.c \ > - ../common/cmfsize.c \ > - ../components/debugger/dbfileio.c \ > - ../components/disassembler/dmbuffer.c \ > - ../components/disassembler/dmcstyle.c \ > - ../components/disassembler/dmdeferred.c \ > - ../common/dmextern.c \ > - ../components/disassembler/dmnames.c \ > - ../components/disassembler/dmopcode.c \ > - ../components/disassembler/dmresrc.c \ > - ../components/disassembler/dmresrcl.c \ > - ../components/disassembler/dmresrcl2.c \ > - ../components/disassembler/dmresrcs.c \ > - ../common/dmrestag.c \ > - ../common/dmswitch.c \ > - ../common/dmtable.c \ > - ../common/dmtables.c \ > - ../common/dmtbdump.c \ > - ../common/dmtbdump1.c \ > - ../common/dmtbdump2.c \ > - ../common/dmtbdump3.c \ > - ../common/dmtbinfo.c \ > - ../common/dmtbinfo1.c \ > - ../common/dmtbinfo2.c \ > - ../common/dmtbinfo3.c \ > - ../components/disassembler/dmutils.c \ > - ../components/disassembler/dmwalk.c \ > - ../components/dispatcher/dsargs.c \ > - ../components/dispatcher/dscontrol.c \ > - ../components/dispatcher/dsfield.c \ > - ../components/dispatcher/dsobject.c \ > - ../components/dispatcher/dsopcode.c \ > - ../components/dispatcher/dspkginit.c \ > - ../components/dispatcher/dsutils.c \ > - ../components/dispatcher/dswexec.c \ > - ../components/dispatcher/dswload.c \ > - ../components/dispatcher/dswload2.c \ > - ../components/dispatcher/dswscope.c \ > - ../components/dispatcher/dswstate.c \ > - ../compiler/dtcompile.c \ > - ../compiler/dtexpress.c \ > - ../compiler/dtfield.c \ > - ../compiler/dtio.c \ > - ../compiler/dtsubtable.c \ > - ../compiler/dttable.c \ > - ../compiler/dttable1.c \ > - ../compiler/dttable2.c \ > - ../compiler/dttemplate.c \ > - ../compiler/dtutils.c \ > - ../components/executer/exconcat.c \ > - ../components/executer/exconvrt.c \ > - ../components/executer/excreate.c \ > - ../components/executer/exdump.c \ > - ../components/executer/exmisc.c \ > - ../components/executer/exmutex.c \ > - ../components/executer/exnames.c \ > - ../components/executer/exoparg1.c \ > - ../components/executer/exoparg2.c \ > - ../components/executer/exoparg3.c \ > - ../components/executer/exoparg6.c \ > - ../components/executer/exprep.c \ > - ../components/executer/exregion.c \ > - ../components/executer/exresnte.c \ > - ../components/executer/exresolv.c \ > - ../components/executer/exresop.c \ > - ../components/executer/exstore.c \ > - ../components/executer/exstoren.c \ > - ../components/executer/exstorob.c \ > - ../components/executer/exsystem.c \ > - ../components/executer/exutils.c \ > - ../common/getopt.c \ > - ../components/namespace/nsaccess.c \ > - ../components/namespace/nsalloc.c \ > - ../components/namespace/nsdump.c \ > - ../components/namespace/nsnames.c \ > - ../components/namespace/nsobject.c \ > - ../components/namespace/nsparse.c \ > - ../components/namespace/nssearch.c \ > - ../components/namespace/nsutils.c \ > - ../components/namespace/nswalk.c \ > - ../components/namespace/nsxfobj.c \ > - ../os_specific/service_layers/osunixxf.c\ > - ../compiler/prexpress.c \ > - ../compiler/prmacros.c \ > - ../compiler/prscan.c \ > - ../compiler/prutils.c \ > - ../components/parser/psargs.c \ > - ../components/parser/psloop.c \ > - ../components/parser/psobject.c \ > - ../components/parser/psopcode.c \ > - ../components/parser/psopinfo.c \ > - ../components/parser/psparse.c \ > - ../components/parser/psscope.c \ > - ../components/parser/pstree.c \ > - ../components/parser/psutils.c \ > - ../components/parser/pswalk.c \ > - ../components/tables/tbdata.c \ > - ../components/tables/tbfadt.c \ > - ../components/tables/tbinstal.c \ > - ../components/tables/tbprint.c \ > - ../components/tables/tbutils.c \ > - ../components/tables/tbxface.c \ > - ../components/tables/tbxfload.c \ > - ../components/utilities/utaddress.c \ > - ../components/utilities/utalloc.c \ > - ../components/utilities/utascii.c \ > - ../components/utilities/utbuffer.c \ > - ../components/utilities/utcache.c \ > - ../components/utilities/utcopy.c \ > - ../components/utilities/utdebug.c \ > - ../components/utilities/utdecode.c \ > - ../components/utilities/utdelete.c \ > - ../components/utilities/uterror.c \ > - ../components/utilities/utexcep.c \ > - ../components/utilities/utglobal.c \ > - ../components/utilities/uthex.c \ > - ../components/utilities/utinit.c \ > - ../components/utilities/utlock.c \ > - ../components/utilities/utmath.c \ > - ../components/utilities/utmisc.c \ > - ../components/utilities/utmutex.c \ > - ../components/utilities/utnonansi.c \ > - ../components/utilities/utobject.c \ > - ../components/utilities/utownerid.c \ > - ../components/utilities/utpredef.c \ > - ../components/utilities/utresdecode.c \ > - ../components/utilities/utresrc.c \ > - ../components/utilities/utstate.c \ > - ../components/utilities/utstrtoul64.c \ > - ../components/utilities/utstrsuppt.c \ > - ../components/utilities/utstring.c \ > - ../components/utilities/utuuid.c \ > - ../components/utilities/utxface.c \ > - ../components/utilities/utxferror.c > diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am > index 6bcf9f86..299f9c09 100644 > --- a/src/lib/src/Makefile.am > +++ b/src/lib/src/Makefile.am > @@ -18,6 +18,7 @@ > > AM_CPPFLAGS = \ > -I$(top_srcdir)/src/lib/include \ > + -I$(top_srcdir)/src/libfwtsiasl \ > -I$(top_srcdir)/src/acpica/source/include \ > -I$(top_srcdir)/src/acpica/source/compiler \ > `pkg-config --silence-errors --cflags json` \ > @@ -29,10 +30,10 @@ AM_CPPFLAGS = \ > > pkglib_LTLIBRARIES = libfwts.la > > -libfwts_la_LDFLAGS = \ > - -lm -lpthread -lbsd \ > - -version-info 1:0:0 \ > - -L$(top_builddir)/src/acpica/source/compiler \ > +libfwts_la_LDFLAGS = \ > + -lm -lpthread -lbsd \ > + -version-info 1:0:0 \ > + -L$(top_builddir)/src/libfwtsiasl \ > -lfwtsiasl `pkg-config --libs glib-2.0 gio-2.0` > > libfwts_la_CPPFLAGS = $(AM_CPPFLAGS) -DACPI_DEBUG_OUTPUT > diff --git a/src/libfwtsacpica/Makefile.am b/src/libfwtsacpica/Makefile.am > new file mode 100644 > index 00000000..509d4306 > --- /dev/null > +++ b/src/libfwtsacpica/Makefile.am > @@ -0,0 +1,289 @@ > +# > +# Copyright (C) 2010-2019 Canonical, Ltd. > +# > +# This program is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public License > +# as published by the Free Software Foundation; either version 2 > +# of the License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > +# > + > +# Nb. the top-level Makefile builds source/compiler for us now... > + > +ACPICA = $(top_srcdir)/src/acpica/source > + > +# > +# -DACPI_EXEC_APP is specific to making ACPICA for the fwts method test > +# > +AM_CPPFLAGS = \ > + -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP \ > + -I$(top_srcdir)/src/lib/include \ > + -I$(ACPICA)/include \ > + -I$(ACPICA)/tools/acpiexec \ > + `pkg-config --silence-errors --cflags json` \ > + `pkg-config --silence-errors --cflags json-c` \ > + -Wall -fno-strict-aliasing \ > + -Wno-address-of-packed-member > + > +# > +# We rename some of the functions so we can override them in fwts. This > +# is a hack, I feel dirty now. > +# > +osunixxf_munged.c: $(ACPICA)/os_specific/service_layers/osunixxf.c > + cat $^ | \ > + sed 's/^AcpiOsPrintf/__AcpiOsPrintf/' | \ > + sed 's/^AcpiOsReadPort/__AcpiOsReadPort/' | \ > + sed 's/^AcpiOsReadPciConfiguration/__AcpiOsReadPciConfiguration/' | \ > + sed 's/^AcpiOsSignalSemaphore/__AcpiOsSignalSemaphore/' | \ > + sed 's/^AcpiOsWaitSemaphore/__AcpiOsWaitSemaphore/' | \ > + sed 's/^AcpiOsCreateSemaphore/__AcpiOsCreateSemaphore/' | \ > + sed 's/^AcpiOsDeleteSemaphore/__AcpiOsDeleteSemaphore/' | \ > + sed 's/^AcpiOsVprintf/__AcpiOsVprintf/' | \ > + sed 's/^AcpiOsSignal/__AcpiOsSignal/' | \ > + sed 's/^AcpiOsSleep/__AcpiOsSleep/' | \ > + sed 's/^AcpiOsExecute/__AcpiOsExecute/' \ > + > $@ > +# > +# Force maximum loop iterations to be just 128 instead of 0xffff > +# because we really don't want to wait until the sun turns into > +# a lump of coal before we complete a blocked operation > +# > +dscontrol_munged.c: $(ACPICA)/components/dispatcher/dscontrol.c > + cat $^ | \ > + sed 's/ACPI_MAX_LOOP_ITERATIONS/0x0080/' \ > + > $@ > + > +BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c > + > +# > +# Source files that are generated on-the fly and need cleaning > +# > +CLEANFILES = osunixxf_munged.c \ > + dscontrol_munged.c \ > + $(ACPICA)/compiler/aslcompiler.output \ > + $(ACPICA)/compiler/dtparser.output \ > + $(ACPICA)/compiler/dtparser.y.h \ > + $(ACPICA)/compiler/prparser.output \ > + $(ACPICA)/compiler/prparser.y.h \ > + $(ACPICA)/compiler/prparserlex.c \ > + $(ACPICA)/compiler/prparserparse.c > + > +pkglib_LTLIBRARIES = libfwtsacpica.la > + > +libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0 > +libfwtsacpica_la_CPPFLAGS = $(AM_CPPFLAGS) > + > +# > +# fwts acpica library sources > +# > +libfwtsacpica_la_SOURCES = \ > + fwts_acpica.c \ > + osunixxf_munged.c \ > + dscontrol_munged.c \ > + $(ACPICA)/components/debugger/dbcmds.c \ > + $(ACPICA)/components/debugger/dbdisply.c \ > + $(ACPICA)/components/debugger/dbexec.c \ > + $(ACPICA)/components/debugger/dbfileio.c \ > + $(ACPICA)/components/debugger/dbhistry.c \ > + $(ACPICA)/components/debugger/dbinput.c \ > + $(ACPICA)/components/debugger/dbstats.c \ > + $(ACPICA)/components/debugger/dbobject.c \ > + $(ACPICA)/components/debugger/dbutils.c \ > + $(ACPICA)/components/debugger/dbxface.c \ > + $(ACPICA)/components/debugger/dbmethod.c \ > + $(ACPICA)/components/debugger/dbnames.c \ > + $(ACPICA)/components/debugger/dbconvert.c \ > + $(ACPICA)/components/debugger/dbtest.c \ > + $(ACPICA)/components/disassembler/dmbuffer.c \ > + $(ACPICA)/components/disassembler/dmcstyle.c \ > + $(ACPICA)/components/disassembler/dmnames.c \ > + $(ACPICA)/components/disassembler/dmopcode.c \ > + $(ACPICA)/components/disassembler/dmresrc.c \ > + $(ACPICA)/components/disassembler/dmresrcl.c \ > + $(ACPICA)/components/disassembler/dmresrcs.c \ > + $(ACPICA)/components/disassembler/dmutils.c \ > + $(ACPICA)/components/disassembler/dmwalk.c \ > + $(ACPICA)/components/disassembler/dmresrcl2.c \ > + $(ACPICA)/components/disassembler/dmdeferred.c \ > + $(ACPICA)/components/dispatcher/dsdebug.c \ > + $(ACPICA)/components/dispatcher/dsfield.c \ > + $(ACPICA)/components/dispatcher/dsinit.c \ > + $(ACPICA)/components/dispatcher/dsmethod.c \ > + $(ACPICA)/components/dispatcher/dsmthdat.c \ > + $(ACPICA)/components/dispatcher/dsobject.c \ > + $(ACPICA)/components/dispatcher/dspkginit.c \ > + $(ACPICA)/components/dispatcher/dsutils.c \ > + $(ACPICA)/components/dispatcher/dswexec.c \ > + $(ACPICA)/components/dispatcher/dswload.c \ > + $(ACPICA)/components/dispatcher/dswscope.c \ > + $(ACPICA)/components/dispatcher/dswstate.c \ > + $(ACPICA)/components/dispatcher/dsargs.c \ > + $(ACPICA)/components/dispatcher/dswload2.c \ > + $(ACPICA)/components/dispatcher/dsopcode.c \ > + $(ACPICA)/components/events/evevent.c \ > + $(ACPICA)/components/events/evgpe.c \ > + $(ACPICA)/components/events/evgpeblk.c \ > + $(ACPICA)/components/events/evgpeinit.c \ > + $(ACPICA)/components/events/evgpeutil.c \ > + $(ACPICA)/components/events/evxfgpe.c \ > + $(ACPICA)/components/events/evmisc.c \ > + $(ACPICA)/components/events/evregion.c \ > + $(ACPICA)/components/events/evrgnini.c \ > + $(ACPICA)/components/events/evsci.c \ > + $(ACPICA)/components/events/evxface.c \ > + $(ACPICA)/components/events/evxfevnt.c \ > + $(ACPICA)/components/events/evxfregn.c \ > + $(ACPICA)/components/events/evglock.c \ > + $(ACPICA)/components/events/evhandler.c \ > + $(ACPICA)/components/executer/exconcat.c \ > + $(ACPICA)/components/executer/exfield.c \ > + $(ACPICA)/components/executer/exfldio.c \ > + $(ACPICA)/components/executer/exmisc.c \ > + $(ACPICA)/components/executer/exmutex.c \ > + $(ACPICA)/components/executer/exnames.c \ > + $(ACPICA)/components/executer/exoparg1.c \ > + $(ACPICA)/components/executer/exoparg2.c \ > + $(ACPICA)/components/executer/exoparg3.c \ > + $(ACPICA)/components/executer/exoparg6.c \ > + $(ACPICA)/components/executer/exprep.c \ > + $(ACPICA)/components/executer/exregion.c \ > + $(ACPICA)/components/executer/exresnte.c \ > + $(ACPICA)/components/executer/exresolv.c \ > + $(ACPICA)/components/executer/exresop.c \ > + $(ACPICA)/components/executer/exserial.c \ > + $(ACPICA)/components/executer/exstore.c \ > + $(ACPICA)/components/executer/exstoren.c \ > + $(ACPICA)/components/executer/exstorob.c \ > + $(ACPICA)/components/executer/exsystem.c \ > + $(ACPICA)/components/executer/extrace.c \ > + $(ACPICA)/components/executer/exutils.c \ > + $(ACPICA)/components/executer/exconvrt.c \ > + $(ACPICA)/components/executer/excreate.c \ > + $(ACPICA)/components/executer/exdump.c \ > + $(ACPICA)/components/executer/exdebug.c \ > + $(ACPICA)/components/executer/exconfig.c \ > + $(ACPICA)/components/hardware/hwacpi.c \ > + $(ACPICA)/components/hardware/hwgpe.c \ > + $(ACPICA)/components/hardware/hwpci.c \ > + $(ACPICA)/components/hardware/hwregs.c \ > + $(ACPICA)/components/hardware/hwsleep.c \ > + $(ACPICA)/components/hardware/hwvalid.c \ > + $(ACPICA)/components/hardware/hwxface.c \ > + $(ACPICA)/components/hardware/hwxfsleep.c \ > + $(ACPICA)/components/hardware/hwesleep.c \ > + $(ACPICA)/components/namespace/nsaccess.c \ > + $(ACPICA)/components/namespace/nsalloc.c \ > + $(ACPICA)/components/namespace/nsdump.c \ > + $(ACPICA)/components/namespace/nsdumpdv.c \ > + $(ACPICA)/components/namespace/nseval.c \ > + $(ACPICA)/components/namespace/nsinit.c \ > + $(ACPICA)/components/namespace/nsload.c \ > + $(ACPICA)/components/namespace/nsnames.c \ > + $(ACPICA)/components/namespace/nsobject.c \ > + $(ACPICA)/components/namespace/nsparse.c \ > + $(ACPICA)/components/namespace/nspredef.c \ > + $(ACPICA)/components/namespace/nsrepair.c \ > + $(ACPICA)/components/namespace/nsrepair2.c \ > + $(ACPICA)/components/namespace/nssearch.c \ > + $(ACPICA)/components/namespace/nsutils.c \ > + $(ACPICA)/components/namespace/nswalk.c \ > + $(ACPICA)/components/namespace/nsxfeval.c \ > + $(ACPICA)/components/namespace/nsxfname.c \ > + $(ACPICA)/components/namespace/nsxfobj.c \ > + $(ACPICA)/components/namespace/nsconvert.c \ > + $(ACPICA)/components/namespace/nsprepkg.c \ > + $(ACPICA)/components/namespace/nsarguments.c \ > + $(ACPICA)/components/parser/psargs.c \ > + $(ACPICA)/components/parser/psloop.c \ > + $(ACPICA)/components/parser/psopcode.c \ > + $(ACPICA)/components/parser/psparse.c \ > + $(ACPICA)/components/parser/psscope.c \ > + $(ACPICA)/components/parser/pstree.c \ > + $(ACPICA)/components/parser/psutils.c \ > + $(ACPICA)/components/parser/pswalk.c \ > + $(ACPICA)/components/parser/psxface.c \ > + $(ACPICA)/components/parser/psopinfo.c \ > + $(ACPICA)/components/parser/psobject.c \ > + $(ACPICA)/components/resources/rsaddr.c \ > + $(ACPICA)/components/resources/rscalc.c \ > + $(ACPICA)/components/resources/rscreate.c \ > + $(ACPICA)/components/resources/rsdump.c \ > + $(ACPICA)/components/resources/rsio.c \ > + $(ACPICA)/components/resources/rsinfo.c \ > + $(ACPICA)/components/resources/rsirq.c \ > + $(ACPICA)/components/resources/rslist.c \ > + $(ACPICA)/components/resources/rsmemory.c \ > + $(ACPICA)/components/resources/rsmisc.c \ > + $(ACPICA)/components/resources/rsutils.c \ > + $(ACPICA)/components/resources/rsxface.c \ > + $(ACPICA)/components/resources/rsserial.c \ > + $(ACPICA)/components/resources/rsdumpinfo.c \ > + $(ACPICA)/components/tables/tbdata.c \ > + $(ACPICA)/components/tables/tbfadt.c \ > + $(ACPICA)/components/tables/tbfind.c \ > + $(ACPICA)/components/tables/tbinstal.c \ > + $(ACPICA)/components/tables/tbutils.c \ > + $(ACPICA)/components/tables/tbxface.c \ > + $(ACPICA)/components/tables/tbxfroot.c \ > + $(ACPICA)/components/tables/tbxfload.c \ > + $(ACPICA)/components/tables/tbprint.c \ > + $(ACPICA)/components/utilities/utaddress.c \ > + $(ACPICA)/components/utilities/utalloc.c \ > + $(ACPICA)/components/utilities/utascii.c \ > + $(ACPICA)/components/utilities/utcache.c \ > + $(ACPICA)/components/utilities/utcopy.c \ > + $(ACPICA)/components/utilities/utdebug.c \ > + $(ACPICA)/components/utilities/utdelete.c \ > + $(ACPICA)/components/utilities/uteval.c \ > + $(ACPICA)/components/utilities/utglobal.c \ > + $(ACPICA)/components/utilities/uthex.c \ > + $(ACPICA)/components/utilities/utids.c \ > + $(ACPICA)/components/utilities/utinit.c \ > + $(ACPICA)/components/utilities/utlock.c \ > + $(ACPICA)/components/utilities/utmath.c \ > + $(ACPICA)/components/utilities/utmisc.c \ > + $(ACPICA)/components/utilities/utmutex.c \ > + $(ACPICA)/components/utilities/utnonansi.c \ > + $(ACPICA)/components/utilities/utobject.c \ > + $(ACPICA)/components/utilities/utresdecode.c \ > + $(ACPICA)/components/utilities/utresrc.c \ > + $(ACPICA)/components/utilities/utstate.c \ > + $(ACPICA)/components/utilities/utstrtoul64.c \ > + $(ACPICA)/components/utilities/uttrack.c \ > + $(ACPICA)/components/utilities/utosi.c \ > + $(ACPICA)/components/utilities/utxferror.c \ > + $(ACPICA)/components/utilities/utxface.c \ > + $(ACPICA)/components/utilities/utdecode.c \ > + $(ACPICA)/components/utilities/utexcep.c \ > + $(ACPICA)/components/utilities/utpredef.c \ > + $(ACPICA)/components/utilities/utstring.c \ > + $(ACPICA)/components/utilities/utstrsuppt.c \ > + $(ACPICA)/components/utilities/utownerid.c \ > + $(ACPICA)/components/utilities/utxfinit.c \ > + $(ACPICA)/components/utilities/uterror.c \ > + $(ACPICA)/components/utilities/utbuffer.c \ > + $(ACPICA)/components/utilities/utuuid.c \ > + $(ACPICA)/common/acfileio.c \ > + $(ACPICA)/common/acgetline.c \ > + $(ACPICA)/common/ahids.c \ > + $(ACPICA)/common/cmfsize.c \ > + $(ACPICA)/common/ahtable.c \ > + $(ACPICA)/common/ahuuids.c \ > + $(ACPICA)/tools/acpiexec/aeinitfile.c \ > + $(ACPICA)/tools/acpiexec/aehandlers.c \ > + $(ACPICA)/tools/acpiexec/aeexception.c \ > + $(ACPICA)/tools/acpiexec/aeregion.c \ > + $(ACPICA)/tools/acpiexec/aeinstall.c \ > + $(ACPICA)/os_specific/service_layers/osgendbg.c > + > +libfwtsacpica_la_LIBADD = \ > + -L$(top_builddir)/src/lib/src -lfwts -lrt > + > diff --git a/src/acpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c > similarity index 100% > rename from src/acpica/fwts_acpica.c > rename to src/libfwtsacpica/fwts_acpica.c > diff --git a/src/libfwtsiasl/Makefile.am b/src/libfwtsiasl/Makefile.am > new file mode 100644 > index 00000000..37c6fcef > --- /dev/null > +++ b/src/libfwtsiasl/Makefile.am > @@ -0,0 +1,312 @@ > +# > +# Copyright (C) 2011-2019 Canonical, Ltd. > +# > +# This program is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public License > +# as published by the Free Software Foundation; either version 2 > +# of the License, or (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program; if not, write to the Free Software > +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. > +# > + > +# > +# We need to build this as a separate shared library with the iasl functionality built in. We > +# just export the fwts_* interface. > +# > +AUTOMAKE_OPTIONS = subdir-objects > + > +ACPICA = $(top_srcdir)/src/acpica/source > + > +AM_CPPFLAGS = -Wall -Wstrict-prototypes \ > + -fno-strict-aliasing \ > + -D_LINUX \ > + -DACPI_ASL_COMPILER $(CFLAGS) \ > + -I$(ACPICA)/include \ > + -I$(ACPICA)/compiler > + > +AM_YFLAGS = -d > + > +# > +# Case in-sensitive scanning > +# > +AM_LFLAGS = -i > + > +ASL_PARSER = \ > + $(ACPICA)/compiler/aslcstyle.y \ > + $(ACPICA)/compiler/aslhelpers.y \ > + $(ACPICA)/compiler/aslparser.y \ > + $(ACPICA)/compiler/aslprimaries.y \ > + $(ACPICA)/compiler/aslresources.y \ > + $(ACPICA)/compiler/aslrules.y \ > + $(ACPICA)/compiler/aslsupport.y \ > + $(ACPICA)/compiler/asltokens.y \ > + $(ACPICA)/compiler/asltypes.y > + > +ASL_LEXER = > + $(ACPICA)/compiler/aslcompiler.l \ > + $(srcdir)/aslsupport.l \ > + $(srcdir)/aslcompiler.y.h > + > +$(srcdir)/aslcompiler.y: $(ASL_PARSER) > + m4 -P -I$(ACPICA)/compiler $(ACPICA)/compiler/aslparser.y > $@ > + > +$(srcdir)/aslcompilerlex.c: $(ASL_LEXER) > + ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(ACPICA)/compiler/aslcompiler.l > + > +.NOTPARALLEL: $(srcdir)/aslcompiler.c > +$(srcdir)/aslcompiler.c $(srcdir)/aslcompiler.y.h: $(srcdir)/aslcompiler.y > + ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ > + mv aslcompiler.tab.c aslcompiler.c > + mv aslcompiler.tab.h aslcompiler.y.h > + > +.NOTPARALLEL: $(srcdir)/dtparserlex.c > +$(srcdir)/dtparserlex.c $(srcdir)/dtparser.c $(srcdir)/dtparser.y.h: $(ACPICA)/compiler/dtparser.l $(ACPICA)/compiler/dtparser.y > + ${LEX} ${AM_LFLAGS} -PDtParser -o$(srcdir)/dtparserlex.c $< > + ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(ACPICA)/compiler/dtparser.y > + mv dtparser.tab.c dtparser.c > + mv dtparser.tab.h dtparser.y.h > + > +.NOTPARALLEL: $(srcdir)/prparserlex.c > +$(srcdir)/prparserlex.c $(srcdir)/prparser.c $(srcdir)/prparser.y.h: $(ACPICA)/compiler/prparser.l $(ACPICA)/compiler/prparser.y > + ${LEX} ${AM_LFLAGS} -PPrParser -o$(srcdir)/prparserlex.c $< > + ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(ACPICA)/compiler/prparser.y > + mv prparser.tab.c prparser.c > + mv prparser.tab.h prparser.y.h > + > +pkglib_LTLIBRARIES = libfwtsiasl.la > + > +BUILT_SOURCES = aslcompiler.y \ > + aslcompiler.y.h \ > + aslcompilerlex.c \ > + aslcompiler.c \ > + dtparser.y.h \ > + dtparserlex.c \ > + dtparser.c \ > + prparser.y.h \ > + prparserlex.c \ > + prparser.c > + > +# > +# Just export fwts specific API so we don't clash with core ACPICA library > +# > +libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -lpthread -version-info 1:0:0 > + > +CLEANFILES = $(BUILT_SOURCES) > + > +libfwtsiasl_la_CPPFLAGS = $(AM_CPPFLAGS) > +libfwtsiasl_la_SOURCES = \ > + fwts_iasl_interface.c \ > + aslcompilerlex.c \ > + aslcompiler.c \ > + dtparserlex.c \ > + dtparser.c \ > + prparserlex.c \ > + prparser.c \ > + $(ACPICA)/common/adisasm.c \ > + $(ACPICA)/common/acfileio.c \ > + $(ACPICA)/common/adfile.c \ > + $(ACPICA)/common/adwalk.c \ > + $(ACPICA)/common/ahids.c \ > + $(ACPICA)/common/ahpredef.c \ > + $(ACPICA)/common/ahtable.c \ > + $(ACPICA)/common/ahuuids.c \ > + $(ACPICA)/compiler/aslallocate.c \ > + $(ACPICA)/compiler/aslanalyze.c \ > + $(ACPICA)/compiler/aslascii.c \ > + $(ACPICA)/compiler/aslbtypes.c \ > + $(ACPICA)/compiler/aslcache.c \ > + $(ACPICA)/compiler/aslcodegen.c \ > + $(ACPICA)/compiler/aslcompile.c \ > + $(ACPICA)/compiler/asldebug.c \ > + $(ACPICA)/compiler/aslerror.c \ > + $(ACPICA)/compiler/aslexternal.c \ > + $(ACPICA)/compiler/aslfiles.c \ > + $(ACPICA)/compiler/aslfileio.c \ > + $(ACPICA)/compiler/aslfold.c \ > + $(ACPICA)/compiler/aslhelp.c \ > + $(ACPICA)/compiler/aslhex.c \ > + $(ACPICA)/compiler/asllength.c \ > + $(ACPICA)/compiler/asllisting.c \ > + $(ACPICA)/compiler/asllistsup.c \ > + $(ACPICA)/compiler/aslload.c \ > + $(ACPICA)/compiler/asllookup.c \ > + $(ACPICA)/compiler/aslmain.c \ > + $(ACPICA)/compiler/aslmap.c \ > + $(ACPICA)/compiler/aslmapenter.c \ > + $(ACPICA)/compiler/aslmapoutput.c \ > + $(ACPICA)/compiler/aslmaputils.c \ > + $(ACPICA)/compiler/aslmessages.c \ > + $(ACPICA)/compiler/aslmethod.c \ > + $(ACPICA)/compiler/aslnamesp.c \ > + $(ACPICA)/compiler/asloffset.c \ > + $(ACPICA)/compiler/aslopcodes.c \ > + $(ACPICA)/compiler/asloperands.c \ > + $(ACPICA)/compiler/aslopt.c \ > + $(ACPICA)/compiler/asloptions.c \ > + $(ACPICA)/compiler/aslparseop.c \ > + $(ACPICA)/compiler/aslpredef.c \ > + $(ACPICA)/compiler/aslprepkg.c \ > + $(ACPICA)/compiler/aslprintf.c \ > + $(ACPICA)/compiler/aslprune.c \ > + $(ACPICA)/compiler/aslresource.c \ > + $(ACPICA)/compiler/aslrestype1.c \ > + $(ACPICA)/compiler/aslrestype1i.c \ > + $(ACPICA)/compiler/aslrestype2.c \ > + $(ACPICA)/compiler/aslrestype2d.c \ > + $(ACPICA)/compiler/aslrestype2e.c \ > + $(ACPICA)/compiler/aslrestype2q.c \ > + $(ACPICA)/compiler/aslrestype2s.c \ > + $(ACPICA)/compiler/aslrestype2w.c \ > + $(ACPICA)/compiler/aslstartup.c \ > + $(ACPICA)/compiler/aslstubs.c \ > + $(ACPICA)/compiler/aslpld.c \ > + $(ACPICA)/compiler/asltransform.c \ > + $(ACPICA)/compiler/asltree.c \ > + $(ACPICA)/compiler/aslutils.c \ > + $(ACPICA)/compiler/asluuid.c \ > + $(ACPICA)/compiler/aslwalks.c \ > + $(ACPICA)/compiler/aslxref.c \ > + $(ACPICA)/compiler/aslxrefout.c \ > + $(ACPICA)/compiler/cvcompiler.c \ > + $(ACPICA)/compiler/cvdisasm.c \ > + $(ACPICA)/compiler/cvparser.c \ > + $(ACPICA)/common/cmfsize.c \ > + $(ACPICA)/components/debugger/dbfileio.c \ > + $(ACPICA)/components/disassembler/dmbuffer.c \ > + $(ACPICA)/components/disassembler/dmcstyle.c \ > + $(ACPICA)/components/disassembler/dmdeferred.c \ > + $(ACPICA)/common/dmextern.c \ > + $(ACPICA)/components/disassembler/dmnames.c \ > + $(ACPICA)/components/disassembler/dmopcode.c \ > + $(ACPICA)/components/disassembler/dmresrc.c \ > + $(ACPICA)/components/disassembler/dmresrcl.c \ > + $(ACPICA)/components/disassembler/dmresrcl2.c \ > + $(ACPICA)/components/disassembler/dmresrcs.c \ > + $(ACPICA)/common/dmrestag.c \ > + $(ACPICA)/common/dmswitch.c \ > + $(ACPICA)/common/dmtable.c \ > + $(ACPICA)/common/dmtables.c \ > + $(ACPICA)/common/dmtbdump.c \ > + $(ACPICA)/common/dmtbdump1.c \ > + $(ACPICA)/common/dmtbdump2.c \ > + $(ACPICA)/common/dmtbdump3.c \ > + $(ACPICA)/common/dmtbinfo.c \ > + $(ACPICA)/common/dmtbinfo1.c \ > + $(ACPICA)/common/dmtbinfo2.c \ > + $(ACPICA)/common/dmtbinfo3.c \ > + $(ACPICA)/components/disassembler/dmutils.c \ > + $(ACPICA)/components/disassembler/dmwalk.c \ > + $(ACPICA)/components/dispatcher/dsargs.c \ > + $(ACPICA)/components/dispatcher/dscontrol.c \ > + $(ACPICA)/components/dispatcher/dsfield.c \ > + $(ACPICA)/components/dispatcher/dsobject.c \ > + $(ACPICA)/components/dispatcher/dsopcode.c \ > + $(ACPICA)/components/dispatcher/dspkginit.c \ > + $(ACPICA)/components/dispatcher/dsutils.c \ > + $(ACPICA)/components/dispatcher/dswexec.c \ > + $(ACPICA)/components/dispatcher/dswload.c \ > + $(ACPICA)/components/dispatcher/dswload2.c \ > + $(ACPICA)/components/dispatcher/dswscope.c \ > + $(ACPICA)/components/dispatcher/dswstate.c \ > + $(ACPICA)/compiler/dtcompile.c \ > + $(ACPICA)/compiler/dtexpress.c \ > + $(ACPICA)/compiler/dtfield.c \ > + $(ACPICA)/compiler/dtio.c \ > + $(ACPICA)/compiler/dtsubtable.c \ > + $(ACPICA)/compiler/dttable.c \ > + $(ACPICA)/compiler/dttable1.c \ > + $(ACPICA)/compiler/dttable2.c \ > + $(ACPICA)/compiler/dttemplate.c \ > + $(ACPICA)/compiler/dtutils.c \ > + $(ACPICA)/components/executer/exconcat.c \ > + $(ACPICA)/components/executer/exconvrt.c \ > + $(ACPICA)/components/executer/excreate.c \ > + $(ACPICA)/components/executer/exdump.c \ > + $(ACPICA)/components/executer/exmisc.c \ > + $(ACPICA)/components/executer/exmutex.c \ > + $(ACPICA)/components/executer/exnames.c \ > + $(ACPICA)/components/executer/exoparg1.c \ > + $(ACPICA)/components/executer/exoparg2.c \ > + $(ACPICA)/components/executer/exoparg3.c \ > + $(ACPICA)/components/executer/exoparg6.c \ > + $(ACPICA)/components/executer/exprep.c \ > + $(ACPICA)/components/executer/exregion.c \ > + $(ACPICA)/components/executer/exresnte.c \ > + $(ACPICA)/components/executer/exresolv.c \ > + $(ACPICA)/components/executer/exresop.c \ > + $(ACPICA)/components/executer/exstore.c \ > + $(ACPICA)/components/executer/exstoren.c \ > + $(ACPICA)/components/executer/exstorob.c \ > + $(ACPICA)/components/executer/exsystem.c \ > + $(ACPICA)/components/executer/exutils.c \ > + $(ACPICA)/common/getopt.c \ > + $(ACPICA)/components/namespace/nsaccess.c \ > + $(ACPICA)/components/namespace/nsalloc.c \ > + $(ACPICA)/components/namespace/nsdump.c \ > + $(ACPICA)/components/namespace/nsnames.c \ > + $(ACPICA)/components/namespace/nsobject.c \ > + $(ACPICA)/components/namespace/nsparse.c \ > + $(ACPICA)/components/namespace/nssearch.c \ > + $(ACPICA)/components/namespace/nsutils.c \ > + $(ACPICA)/components/namespace/nswalk.c \ > + $(ACPICA)/components/namespace/nsxfobj.c \ > + $(ACPICA)/os_specific/service_layers/osunixxf.c \ > + $(ACPICA)/compiler/prexpress.c \ > + $(ACPICA)/compiler/prmacros.c \ > + $(ACPICA)/compiler/prscan.c \ > + $(ACPICA)/compiler/prutils.c \ > + $(ACPICA)/components/parser/psargs.c \ > + $(ACPICA)/components/parser/psloop.c \ > + $(ACPICA)/components/parser/psobject.c \ > + $(ACPICA)/components/parser/psopcode.c \ > + $(ACPICA)/components/parser/psopinfo.c \ > + $(ACPICA)/components/parser/psparse.c \ > + $(ACPICA)/components/parser/psscope.c \ > + $(ACPICA)/components/parser/pstree.c \ > + $(ACPICA)/components/parser/psutils.c \ > + $(ACPICA)/components/parser/pswalk.c \ > + $(ACPICA)/components/tables/tbdata.c \ > + $(ACPICA)/components/tables/tbfadt.c \ > + $(ACPICA)/components/tables/tbinstal.c \ > + $(ACPICA)/components/tables/tbprint.c \ > + $(ACPICA)/components/tables/tbutils.c \ > + $(ACPICA)/components/tables/tbxface.c \ > + $(ACPICA)/components/tables/tbxfload.c \ > + $(ACPICA)/components/utilities/utaddress.c \ > + $(ACPICA)/components/utilities/utalloc.c \ > + $(ACPICA)/components/utilities/utascii.c \ > + $(ACPICA)/components/utilities/utbuffer.c \ > + $(ACPICA)/components/utilities/utcache.c \ > + $(ACPICA)/components/utilities/utcopy.c \ > + $(ACPICA)/components/utilities/utdebug.c \ > + $(ACPICA)/components/utilities/utdecode.c \ > + $(ACPICA)/components/utilities/utdelete.c \ > + $(ACPICA)/components/utilities/uterror.c \ > + $(ACPICA)/components/utilities/utexcep.c \ > + $(ACPICA)/components/utilities/utglobal.c \ > + $(ACPICA)/components/utilities/uthex.c \ > + $(ACPICA)/components/utilities/utinit.c \ > + $(ACPICA)/components/utilities/utlock.c \ > + $(ACPICA)/components/utilities/utmath.c \ > + $(ACPICA)/components/utilities/utmisc.c \ > + $(ACPICA)/components/utilities/utmutex.c \ > + $(ACPICA)/components/utilities/utnonansi.c \ > + $(ACPICA)/components/utilities/utobject.c \ > + $(ACPICA)/components/utilities/utownerid.c \ > + $(ACPICA)/components/utilities/utpredef.c \ > + $(ACPICA)/components/utilities/utresdecode.c \ > + $(ACPICA)/components/utilities/utresrc.c \ > + $(ACPICA)/components/utilities/utstate.c \ > + $(ACPICA)/components/utilities/utstrtoul64.c \ > + $(ACPICA)/components/utilities/utstrsuppt.c \ > + $(ACPICA)/components/utilities/utstring.c \ > + $(ACPICA)/components/utilities/utuuid.c \ > + $(ACPICA)/components/utilities/utxface.c \ > + $(ACPICA)/components/utilities/utxferror.c > diff --git a/src/acpica/source/compiler/fwts_iasl_interface.c b/src/libfwtsiasl/fwts_iasl_interface.c > similarity index 100% > rename from src/acpica/source/compiler/fwts_iasl_interface.c > rename to src/libfwtsiasl/fwts_iasl_interface.c > diff --git a/src/acpica/source/compiler/fwts_iasl_interface.h b/src/libfwtsiasl/fwts_iasl_interface.h > similarity index 100% > rename from src/acpica/source/compiler/fwts_iasl_interface.h > rename to src/libfwtsiasl/fwts_iasl_interface.h > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/configure.ac b/configure.ac index 0109d644..39a445cd 100644 --- a/configure.ac +++ b/configure.ac @@ -101,8 +101,8 @@ AC_CONFIG_FILES([ Makefile src/Makefile - src/acpica/source/compiler/Makefile - src/acpica/Makefile + src/libfwtsiasl/Makefile + src/libfwtsacpica/Makefile src/lib/Makefile src/lib/src/Makefile src/utilities/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 62c9ba8f..904fc020 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ # 3. acpica # ... because the libs in this bundled acpica/ depend on lib/ (libfwts.so), # but libfwts.so depends on libraries produced by acpica/source/compiler. -SUBDIRS = acpica/source/compiler lib acpica +SUBDIRS = libfwtsiasl lib libfwtsacpica AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib/include \ @@ -197,7 +197,12 @@ fwts_SOURCES = main.c \ fwts_LDFLAGS = -lm -lbsd `pkg-config --libs glib-2.0 gio-2.0` fwts_LDADD = \ - -L$(top_builddir)/src/acpica -lfwtsacpica \ - -Llib/src -lfwts + -L$(top_builddir)/src \ + -L$(top_builddir)/src/acpica \ + -L$(top_builddir)/src/libfwtsiasl \ + -L$(top_builddir)/src/libfwtsacpica \ + -L$(top_builddir)/src/lib/src \ + -lfwtsacpica \ + -lfwts man_MANS = ../doc/fwts.1 ../doc/fwts-collect.1 ../doc/fwts-frontend-text.1 diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am deleted file mode 100644 index 03dd9820..00000000 --- a/src/acpica/Makefile.am +++ /dev/null @@ -1,288 +0,0 @@ -# -# Copyright (C) 2010-2019 Canonical, Ltd. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -# Nb. the top-level Makefile builds source/compiler for us now... -## SUBDIRS = source/compiler - -# -# -DACPI_EXEC_APP is specific to making ACPICA for the fwts method test -# -AM_CPPFLAGS = \ - -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP \ - -I$(top_srcdir)/src/lib/include \ - -I$(srcdir)/source/include \ - -I$(srcdir)/source/tools/acpiexec \ - `pkg-config --silence-errors --cflags json` \ - `pkg-config --silence-errors --cflags json-c` \ - -Wall -fno-strict-aliasing \ - -Wno-address-of-packed-member - -# -# We rename some of the functions so we can override them in fwts. This -# is a hack, I feel dirty now. -# -osunixxf_munged.c: $(srcdir)/source/os_specific/service_layers/osunixxf.c - cat $^ | \ - sed 's/^AcpiOsPrintf/__AcpiOsPrintf/' | \ - sed 's/^AcpiOsReadPort/__AcpiOsReadPort/' | \ - sed 's/^AcpiOsReadPciConfiguration/__AcpiOsReadPciConfiguration/' | \ - sed 's/^AcpiOsSignalSemaphore/__AcpiOsSignalSemaphore/' | \ - sed 's/^AcpiOsWaitSemaphore/__AcpiOsWaitSemaphore/' | \ - sed 's/^AcpiOsCreateSemaphore/__AcpiOsCreateSemaphore/' | \ - sed 's/^AcpiOsDeleteSemaphore/__AcpiOsDeleteSemaphore/' | \ - sed 's/^AcpiOsVprintf/__AcpiOsVprintf/' | \ - sed 's/^AcpiOsSignal/__AcpiOsSignal/' | \ - sed 's/^AcpiOsSleep/__AcpiOsSleep/' | \ - sed 's/^AcpiOsExecute/__AcpiOsExecute/' \ - > $@ -# -# Force maximum loop iterations to be just 128 instead of 0xffff -# because we really don't want to wait until the sun turns into -# a lump of coal before we complete a blocked operation -# -dscontrol_munged.c: $(srcdir)/source/components/dispatcher/dscontrol.c - cat $^ | \ - sed 's/ACPI_MAX_LOOP_ITERATIONS/0x0080/' \ - > $@ - -BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c - -# -# Source files that are generated on-the fly and need cleaning -# -CLEANFILES = osunixxf_munged.c \ - dscontrol_munged.c \ - source/compiler/aslcompiler.output \ - source/compiler/dtparser.output \ - source/compiler/dtparser.y.h \ - source/compiler/prparser.output \ - source/compiler/prparser.y.h \ - source/compiler/prparserlex.c \ - source/compiler/prparserparse.c - -pkglib_LTLIBRARIES = libfwtsacpica.la - -libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0 -libfwtsacpica_la_CPPFLAGS = $(AM_CPPFLAGS) - -# -# fwts acpica library sources -# -libfwtsacpica_la_SOURCES = \ - fwts_acpica.c \ - osunixxf_munged.c \ - dscontrol_munged.c \ - source/components/debugger/dbcmds.c \ - source/components/debugger/dbdisply.c \ - source/components/debugger/dbexec.c \ - source/components/debugger/dbfileio.c \ - source/components/debugger/dbhistry.c \ - source/components/debugger/dbinput.c \ - source/components/debugger/dbstats.c \ - source/components/debugger/dbobject.c \ - source/components/debugger/dbutils.c \ - source/components/debugger/dbxface.c \ - source/components/debugger/dbmethod.c \ - source/components/debugger/dbnames.c \ - source/components/debugger/dbconvert.c \ - source/components/debugger/dbtest.c \ - source/components/disassembler/dmbuffer.c \ - source/components/disassembler/dmcstyle.c \ - source/components/disassembler/dmnames.c \ - source/components/disassembler/dmopcode.c \ - source/components/disassembler/dmresrc.c \ - source/components/disassembler/dmresrcl.c \ - source/components/disassembler/dmresrcs.c \ - source/components/disassembler/dmutils.c \ - source/components/disassembler/dmwalk.c \ - source/components/disassembler/dmresrcl2.c \ - source/components/disassembler/dmdeferred.c \ - source/components/dispatcher/dsdebug.c \ - source/components/dispatcher/dsfield.c \ - source/components/dispatcher/dsinit.c \ - source/components/dispatcher/dsmethod.c \ - source/components/dispatcher/dsmthdat.c \ - source/components/dispatcher/dsobject.c \ - source/components/dispatcher/dspkginit.c \ - source/components/dispatcher/dsutils.c \ - source/components/dispatcher/dswexec.c \ - source/components/dispatcher/dswload.c \ - source/components/dispatcher/dswscope.c \ - source/components/dispatcher/dswstate.c \ - source/components/dispatcher/dsargs.c \ - source/components/dispatcher/dswload2.c \ - source/components/dispatcher/dsopcode.c \ - source/components/events/evevent.c \ - source/components/events/evgpe.c \ - source/components/events/evgpeblk.c \ - source/components/events/evgpeinit.c \ - source/components/events/evgpeutil.c \ - source/components/events/evxfgpe.c \ - source/components/events/evmisc.c \ - source/components/events/evregion.c \ - source/components/events/evrgnini.c \ - source/components/events/evsci.c \ - source/components/events/evxface.c \ - source/components/events/evxfevnt.c \ - source/components/events/evxfregn.c \ - source/components/events/evglock.c \ - source/components/events/evhandler.c \ - source/components/executer/exconcat.c \ - source/components/executer/exfield.c \ - source/components/executer/exfldio.c \ - source/components/executer/exmisc.c \ - source/components/executer/exmutex.c \ - source/components/executer/exnames.c \ - source/components/executer/exoparg1.c \ - source/components/executer/exoparg2.c \ - source/components/executer/exoparg3.c \ - source/components/executer/exoparg6.c \ - source/components/executer/exprep.c \ - source/components/executer/exregion.c \ - source/components/executer/exresnte.c \ - source/components/executer/exresolv.c \ - source/components/executer/exresop.c \ - source/components/executer/exserial.c \ - source/components/executer/exstore.c \ - source/components/executer/exstoren.c \ - source/components/executer/exstorob.c \ - source/components/executer/exsystem.c \ - source/components/executer/extrace.c \ - source/components/executer/exutils.c \ - source/components/executer/exconvrt.c \ - source/components/executer/excreate.c \ - source/components/executer/exdump.c \ - source/components/executer/exdebug.c \ - source/components/executer/exconfig.c \ - source/components/hardware/hwacpi.c \ - source/components/hardware/hwgpe.c \ - source/components/hardware/hwpci.c \ - source/components/hardware/hwregs.c \ - source/components/hardware/hwsleep.c \ - source/components/hardware/hwvalid.c \ - source/components/hardware/hwxface.c \ - source/components/hardware/hwxfsleep.c \ - source/components/hardware/hwesleep.c \ - source/components/namespace/nsaccess.c \ - source/components/namespace/nsalloc.c \ - source/components/namespace/nsdump.c \ - source/components/namespace/nsdumpdv.c \ - source/components/namespace/nseval.c \ - source/components/namespace/nsinit.c \ - source/components/namespace/nsload.c \ - source/components/namespace/nsnames.c \ - source/components/namespace/nsobject.c \ - source/components/namespace/nsparse.c \ - source/components/namespace/nspredef.c \ - source/components/namespace/nsrepair.c \ - source/components/namespace/nsrepair2.c \ - source/components/namespace/nssearch.c \ - source/components/namespace/nsutils.c \ - source/components/namespace/nswalk.c \ - source/components/namespace/nsxfeval.c \ - source/components/namespace/nsxfname.c \ - source/components/namespace/nsxfobj.c \ - source/components/namespace/nsconvert.c \ - source/components/namespace/nsprepkg.c \ - source/components/namespace/nsarguments.c \ - source/components/parser/psargs.c \ - source/components/parser/psloop.c \ - source/components/parser/psopcode.c \ - source/components/parser/psparse.c \ - source/components/parser/psscope.c \ - source/components/parser/pstree.c \ - source/components/parser/psutils.c \ - source/components/parser/pswalk.c \ - source/components/parser/psxface.c \ - source/components/parser/psopinfo.c \ - source/components/parser/psobject.c \ - source/components/resources/rsaddr.c \ - source/components/resources/rscalc.c \ - source/components/resources/rscreate.c \ - source/components/resources/rsdump.c \ - source/components/resources/rsio.c \ - source/components/resources/rsinfo.c \ - source/components/resources/rsirq.c \ - source/components/resources/rslist.c \ - source/components/resources/rsmemory.c \ - source/components/resources/rsmisc.c \ - source/components/resources/rsutils.c \ - source/components/resources/rsxface.c \ - source/components/resources/rsserial.c \ - source/components/resources/rsdumpinfo.c \ - source/components/tables/tbdata.c \ - source/components/tables/tbfadt.c \ - source/components/tables/tbfind.c \ - source/components/tables/tbinstal.c \ - source/components/tables/tbutils.c \ - source/components/tables/tbxface.c \ - source/components/tables/tbxfroot.c \ - source/components/tables/tbxfload.c \ - source/components/tables/tbprint.c \ - source/components/utilities/utaddress.c \ - source/components/utilities/utalloc.c \ - source/components/utilities/utascii.c \ - source/components/utilities/utcache.c \ - source/components/utilities/utcopy.c \ - source/components/utilities/utdebug.c \ - source/components/utilities/utdelete.c \ - source/components/utilities/uteval.c \ - source/components/utilities/utglobal.c \ - source/components/utilities/uthex.c \ - source/components/utilities/utids.c \ - source/components/utilities/utinit.c \ - source/components/utilities/utlock.c \ - source/components/utilities/utmath.c \ - source/components/utilities/utmisc.c \ - source/components/utilities/utmutex.c \ - source/components/utilities/utnonansi.c \ - source/components/utilities/utobject.c \ - source/components/utilities/utresdecode.c \ - source/components/utilities/utresrc.c \ - source/components/utilities/utstate.c \ - source/components/utilities/utstrtoul64.c \ - source/components/utilities/uttrack.c \ - source/components/utilities/utosi.c \ - source/components/utilities/utxferror.c \ - source/components/utilities/utxface.c \ - source/components/utilities/utdecode.c \ - source/components/utilities/utexcep.c \ - source/components/utilities/utpredef.c \ - source/components/utilities/utstring.c \ - source/components/utilities/utstrsuppt.c \ - source/components/utilities/utownerid.c \ - source/components/utilities/utxfinit.c \ - source/components/utilities/uterror.c \ - source/components/utilities/utbuffer.c \ - source/components/utilities/utuuid.c \ - source/common/acfileio.c \ - source/common/acgetline.c \ - source/common/ahids.c \ - source/common/cmfsize.c \ - source/common/ahtable.c \ - source/common/ahuuids.c \ - source/tools/acpiexec/aeinitfile.c \ - source/tools/acpiexec/aehandlers.c \ - source/tools/acpiexec/aeexception.c \ - source/tools/acpiexec/aeregion.c \ - source/tools/acpiexec/aeinstall.c \ - source/os_specific/service_layers/osgendbg.c - -libfwtsacpica_la_LIBADD = \ - -L$(top_builddir)/src/lib/src -lfwts -lrt - diff --git a/src/acpica/source/compiler/Makefile.am b/src/acpica/source/compiler/Makefile.am deleted file mode 100644 index b237b47c..00000000 --- a/src/acpica/source/compiler/Makefile.am +++ /dev/null @@ -1,306 +0,0 @@ -# -# Copyright (C) 2011-2019 Canonical, Ltd. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# - -# -# We need to build this as a separate shared library with the iasl functionality built in. We -# just export the fwts_* interface. -# -AUTOMAKE_OPTIONS = subdir-objects - -AM_CPPFLAGS = -Wall -Wstrict-prototypes -fno-strict-aliasing -D_LINUX \ - -DACPI_ASL_COMPILER $(CFLAGS) -I$(top_srcdir)/src/acpica/source/include - -AM_YFLAGS = -d - -# -# Case in-sensitive scanning -# -AM_LFLAGS = -i - -ASL_PARSER = \ - $(srcdir)/aslcstyle.y \ - $(srcdir)/aslhelpers.y \ - $(srcdir)/aslparser.y \ - $(srcdir)/aslprimaries.y \ - $(srcdir)/aslresources.y \ - $(srcdir)/aslrules.y \ - $(srcdir)/aslsupport.y \ - $(srcdir)/asltokens.y \ - $(srcdir)/asltypes.y - -ASL_LEXER = - $(srcdir)/aslcompiler.l \ - $(srcdir)/aslsupport.l \ - $(srcdir)/aslcompiler.y.h - -$(srcdir)/aslcompiler.y: $(ASL_PARSER) - m4 -P -I$(srcdir) $(srcdir)/aslparser.y > $@ - -$(srcdir)/aslcompilerlex.c: $(ASL_LEXER) - ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(srcdir)/aslcompiler.l - -.NOTPARALLEL: $(srcdir)/aslcompiler.c -$(srcdir)/aslcompiler.c $(srcdir)/aslcompiler.y.h: $(srcdir)/aslcompiler.y - ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ - mv aslcompiler.tab.c aslcompiler.c - mv aslcompiler.tab.h aslcompiler.y.h - -.NOTPARALLEL: $(srcdir)/dtparserlex.c -$(srcdir)/dtparserlex.c $(srcdir)/dtparser.c $(srcdir)/dtparser.y.h: $(srcdir)/dtparser.l $(srcdir)/dtparser.y - ${LEX} ${AM_LFLAGS} -PDtParser -o$(srcdir)/dtparserlex.c $< - ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(srcdir)/dtparser.y - mv dtparser.tab.c dtparser.c - mv dtparser.tab.h dtparser.y.h - -.NOTPARALLEL: $(srcdir)/prparserlex.c -$(srcdir)/prparserlex.c $(srcdir)/prparser.c $(srcdir)/prparser.y.h: $(srcdir)/prparser.l $(srcdir)/prparser.y - ${LEX} ${AM_LFLAGS} -PPrParser -o$(srcdir)/prparserlex.c $< - ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(srcdir)/prparser.y - mv prparser.tab.c prparser.c - mv prparser.tab.h prparser.y.h - -pkglib_LTLIBRARIES = libfwtsiasl.la - -BUILT_SOURCES = aslcompiler.y \ - aslcompiler.y.h \ - aslcompilerlex.c \ - aslcompiler.c \ - dtparser.y.h \ - dtparserlex.c \ - dtparser.c \ - prparser.y.h \ - prparserlex.c \ - prparser.c - -# -# Just export fwts specific API so we don't clash with core ACPICA library -# -libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -lpthread -version-info 1:0:0 - -CLEANFILES = $(BUILT_SOURCES) - -libfwtsiasl_la_CPPFLAGS = $(AM_CPPFLAGS) -libfwtsiasl_la_SOURCES = \ - fwts_iasl_interface.c \ - aslcompilerlex.c \ - aslcompiler.c \ - dtparserlex.c \ - dtparser.c \ - prparserlex.c \ - prparser.c \ - ../common/adisasm.c \ - ../common/acfileio.c \ - ../common/adfile.c \ - ../common/adwalk.c \ - ../common/ahids.c \ - ../common/ahpredef.c \ - ../common/ahtable.c \ - ../common/ahuuids.c \ - ../compiler/aslallocate.c \ - ../compiler/aslanalyze.c \ - ../compiler/aslascii.c \ - ../compiler/aslbtypes.c \ - ../compiler/aslcache.c \ - ../compiler/aslcodegen.c \ - ../compiler/aslcompile.c \ - ../compiler/asldebug.c \ - ../compiler/aslerror.c \ - ../compiler/aslexternal.c \ - ../compiler/aslfiles.c \ - ../compiler/aslfileio.c \ - ../compiler/aslfold.c \ - ../compiler/aslhelp.c \ - ../compiler/aslhex.c \ - ../compiler/asllength.c \ - ../compiler/asllisting.c \ - ../compiler/asllistsup.c \ - ../compiler/aslload.c \ - ../compiler/asllookup.c \ - ../compiler/aslmain.c \ - ../compiler/aslmap.c \ - ../compiler/aslmapenter.c \ - ../compiler/aslmapoutput.c \ - ../compiler/aslmaputils.c \ - ../compiler/aslmessages.c \ - ../compiler/aslmethod.c \ - ../compiler/aslnamesp.c \ - ../compiler/asloffset.c \ - ../compiler/aslopcodes.c \ - ../compiler/asloperands.c \ - ../compiler/aslopt.c \ - ../compiler/asloptions.c \ - ../compiler/aslparseop.c \ - ../compiler/aslpredef.c \ - ../compiler/aslprepkg.c \ - ../compiler/aslprintf.c \ - ../compiler/aslprune.c \ - ../compiler/aslresource.c \ - ../compiler/aslrestype1.c \ - ../compiler/aslrestype1i.c \ - ../compiler/aslrestype2.c \ - ../compiler/aslrestype2d.c \ - ../compiler/aslrestype2e.c \ - ../compiler/aslrestype2q.c \ - ../compiler/aslrestype2s.c \ - ../compiler/aslrestype2w.c \ - ../compiler/aslstartup.c \ - ../compiler/aslstubs.c \ - ../compiler/aslpld.c \ - ../compiler/asltransform.c \ - ../compiler/asltree.c \ - ../compiler/aslutils.c \ - ../compiler/asluuid.c \ - ../compiler/aslwalks.c \ - ../compiler/aslxref.c \ - ../compiler/aslxrefout.c \ - ../compiler/cvcompiler.c \ - ../compiler/cvdisasm.c \ - ../compiler/cvparser.c \ - ../common/cmfsize.c \ - ../components/debugger/dbfileio.c \ - ../components/disassembler/dmbuffer.c \ - ../components/disassembler/dmcstyle.c \ - ../components/disassembler/dmdeferred.c \ - ../common/dmextern.c \ - ../components/disassembler/dmnames.c \ - ../components/disassembler/dmopcode.c \ - ../components/disassembler/dmresrc.c \ - ../components/disassembler/dmresrcl.c \ - ../components/disassembler/dmresrcl2.c \ - ../components/disassembler/dmresrcs.c \ - ../common/dmrestag.c \ - ../common/dmswitch.c \ - ../common/dmtable.c \ - ../common/dmtables.c \ - ../common/dmtbdump.c \ - ../common/dmtbdump1.c \ - ../common/dmtbdump2.c \ - ../common/dmtbdump3.c \ - ../common/dmtbinfo.c \ - ../common/dmtbinfo1.c \ - ../common/dmtbinfo2.c \ - ../common/dmtbinfo3.c \ - ../components/disassembler/dmutils.c \ - ../components/disassembler/dmwalk.c \ - ../components/dispatcher/dsargs.c \ - ../components/dispatcher/dscontrol.c \ - ../components/dispatcher/dsfield.c \ - ../components/dispatcher/dsobject.c \ - ../components/dispatcher/dsopcode.c \ - ../components/dispatcher/dspkginit.c \ - ../components/dispatcher/dsutils.c \ - ../components/dispatcher/dswexec.c \ - ../components/dispatcher/dswload.c \ - ../components/dispatcher/dswload2.c \ - ../components/dispatcher/dswscope.c \ - ../components/dispatcher/dswstate.c \ - ../compiler/dtcompile.c \ - ../compiler/dtexpress.c \ - ../compiler/dtfield.c \ - ../compiler/dtio.c \ - ../compiler/dtsubtable.c \ - ../compiler/dttable.c \ - ../compiler/dttable1.c \ - ../compiler/dttable2.c \ - ../compiler/dttemplate.c \ - ../compiler/dtutils.c \ - ../components/executer/exconcat.c \ - ../components/executer/exconvrt.c \ - ../components/executer/excreate.c \ - ../components/executer/exdump.c \ - ../components/executer/exmisc.c \ - ../components/executer/exmutex.c \ - ../components/executer/exnames.c \ - ../components/executer/exoparg1.c \ - ../components/executer/exoparg2.c \ - ../components/executer/exoparg3.c \ - ../components/executer/exoparg6.c \ - ../components/executer/exprep.c \ - ../components/executer/exregion.c \ - ../components/executer/exresnte.c \ - ../components/executer/exresolv.c \ - ../components/executer/exresop.c \ - ../components/executer/exstore.c \ - ../components/executer/exstoren.c \ - ../components/executer/exstorob.c \ - ../components/executer/exsystem.c \ - ../components/executer/exutils.c \ - ../common/getopt.c \ - ../components/namespace/nsaccess.c \ - ../components/namespace/nsalloc.c \ - ../components/namespace/nsdump.c \ - ../components/namespace/nsnames.c \ - ../components/namespace/nsobject.c \ - ../components/namespace/nsparse.c \ - ../components/namespace/nssearch.c \ - ../components/namespace/nsutils.c \ - ../components/namespace/nswalk.c \ - ../components/namespace/nsxfobj.c \ - ../os_specific/service_layers/osunixxf.c\ - ../compiler/prexpress.c \ - ../compiler/prmacros.c \ - ../compiler/prscan.c \ - ../compiler/prutils.c \ - ../components/parser/psargs.c \ - ../components/parser/psloop.c \ - ../components/parser/psobject.c \ - ../components/parser/psopcode.c \ - ../components/parser/psopinfo.c \ - ../components/parser/psparse.c \ - ../components/parser/psscope.c \ - ../components/parser/pstree.c \ - ../components/parser/psutils.c \ - ../components/parser/pswalk.c \ - ../components/tables/tbdata.c \ - ../components/tables/tbfadt.c \ - ../components/tables/tbinstal.c \ - ../components/tables/tbprint.c \ - ../components/tables/tbutils.c \ - ../components/tables/tbxface.c \ - ../components/tables/tbxfload.c \ - ../components/utilities/utaddress.c \ - ../components/utilities/utalloc.c \ - ../components/utilities/utascii.c \ - ../components/utilities/utbuffer.c \ - ../components/utilities/utcache.c \ - ../components/utilities/utcopy.c \ - ../components/utilities/utdebug.c \ - ../components/utilities/utdecode.c \ - ../components/utilities/utdelete.c \ - ../components/utilities/uterror.c \ - ../components/utilities/utexcep.c \ - ../components/utilities/utglobal.c \ - ../components/utilities/uthex.c \ - ../components/utilities/utinit.c \ - ../components/utilities/utlock.c \ - ../components/utilities/utmath.c \ - ../components/utilities/utmisc.c \ - ../components/utilities/utmutex.c \ - ../components/utilities/utnonansi.c \ - ../components/utilities/utobject.c \ - ../components/utilities/utownerid.c \ - ../components/utilities/utpredef.c \ - ../components/utilities/utresdecode.c \ - ../components/utilities/utresrc.c \ - ../components/utilities/utstate.c \ - ../components/utilities/utstrtoul64.c \ - ../components/utilities/utstrsuppt.c \ - ../components/utilities/utstring.c \ - ../components/utilities/utuuid.c \ - ../components/utilities/utxface.c \ - ../components/utilities/utxferror.c diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am index 6bcf9f86..299f9c09 100644 --- a/src/lib/src/Makefile.am +++ b/src/lib/src/Makefile.am @@ -18,6 +18,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/lib/include \ + -I$(top_srcdir)/src/libfwtsiasl \ -I$(top_srcdir)/src/acpica/source/include \ -I$(top_srcdir)/src/acpica/source/compiler \ `pkg-config --silence-errors --cflags json` \ @@ -29,10 +30,10 @@ AM_CPPFLAGS = \ pkglib_LTLIBRARIES = libfwts.la -libfwts_la_LDFLAGS = \ - -lm -lpthread -lbsd \ - -version-info 1:0:0 \ - -L$(top_builddir)/src/acpica/source/compiler \ +libfwts_la_LDFLAGS = \ + -lm -lpthread -lbsd \ + -version-info 1:0:0 \ + -L$(top_builddir)/src/libfwtsiasl \ -lfwtsiasl `pkg-config --libs glib-2.0 gio-2.0` libfwts_la_CPPFLAGS = $(AM_CPPFLAGS) -DACPI_DEBUG_OUTPUT diff --git a/src/libfwtsacpica/Makefile.am b/src/libfwtsacpica/Makefile.am new file mode 100644 index 00000000..509d4306 --- /dev/null +++ b/src/libfwtsacpica/Makefile.am @@ -0,0 +1,289 @@ +# +# Copyright (C) 2010-2019 Canonical, Ltd. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# + +# Nb. the top-level Makefile builds source/compiler for us now... + +ACPICA = $(top_srcdir)/src/acpica/source + +# +# -DACPI_EXEC_APP is specific to making ACPICA for the fwts method test +# +AM_CPPFLAGS = \ + -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP \ + -I$(top_srcdir)/src/lib/include \ + -I$(ACPICA)/include \ + -I$(ACPICA)/tools/acpiexec \ + `pkg-config --silence-errors --cflags json` \ + `pkg-config --silence-errors --cflags json-c` \ + -Wall -fno-strict-aliasing \ + -Wno-address-of-packed-member + +# +# We rename some of the functions so we can override them in fwts. This +# is a hack, I feel dirty now. +# +osunixxf_munged.c: $(ACPICA)/os_specific/service_layers/osunixxf.c + cat $^ | \ + sed 's/^AcpiOsPrintf/__AcpiOsPrintf/' | \ + sed 's/^AcpiOsReadPort/__AcpiOsReadPort/' | \ + sed 's/^AcpiOsReadPciConfiguration/__AcpiOsReadPciConfiguration/' | \ + sed 's/^AcpiOsSignalSemaphore/__AcpiOsSignalSemaphore/' | \ + sed 's/^AcpiOsWaitSemaphore/__AcpiOsWaitSemaphore/' | \ + sed 's/^AcpiOsCreateSemaphore/__AcpiOsCreateSemaphore/' | \ + sed 's/^AcpiOsDeleteSemaphore/__AcpiOsDeleteSemaphore/' | \ + sed 's/^AcpiOsVprintf/__AcpiOsVprintf/' | \ + sed 's/^AcpiOsSignal/__AcpiOsSignal/' | \ + sed 's/^AcpiOsSleep/__AcpiOsSleep/' | \ + sed 's/^AcpiOsExecute/__AcpiOsExecute/' \ + > $@ +# +# Force maximum loop iterations to be just 128 instead of 0xffff +# because we really don't want to wait until the sun turns into +# a lump of coal before we complete a blocked operation +# +dscontrol_munged.c: $(ACPICA)/components/dispatcher/dscontrol.c + cat $^ | \ + sed 's/ACPI_MAX_LOOP_ITERATIONS/0x0080/' \ + > $@ + +BUILT_SOURCES = osunixxf_munged.c dscontrol_munged.c + +# +# Source files that are generated on-the fly and need cleaning +# +CLEANFILES = osunixxf_munged.c \ + dscontrol_munged.c \ + $(ACPICA)/compiler/aslcompiler.output \ + $(ACPICA)/compiler/dtparser.output \ + $(ACPICA)/compiler/dtparser.y.h \ + $(ACPICA)/compiler/prparser.output \ + $(ACPICA)/compiler/prparser.y.h \ + $(ACPICA)/compiler/prparserlex.c \ + $(ACPICA)/compiler/prparserparse.c + +pkglib_LTLIBRARIES = libfwtsacpica.la + +libfwtsacpica_la_LDFLAGS = -lpthread -version-info 1:0:0 +libfwtsacpica_la_CPPFLAGS = $(AM_CPPFLAGS) + +# +# fwts acpica library sources +# +libfwtsacpica_la_SOURCES = \ + fwts_acpica.c \ + osunixxf_munged.c \ + dscontrol_munged.c \ + $(ACPICA)/components/debugger/dbcmds.c \ + $(ACPICA)/components/debugger/dbdisply.c \ + $(ACPICA)/components/debugger/dbexec.c \ + $(ACPICA)/components/debugger/dbfileio.c \ + $(ACPICA)/components/debugger/dbhistry.c \ + $(ACPICA)/components/debugger/dbinput.c \ + $(ACPICA)/components/debugger/dbstats.c \ + $(ACPICA)/components/debugger/dbobject.c \ + $(ACPICA)/components/debugger/dbutils.c \ + $(ACPICA)/components/debugger/dbxface.c \ + $(ACPICA)/components/debugger/dbmethod.c \ + $(ACPICA)/components/debugger/dbnames.c \ + $(ACPICA)/components/debugger/dbconvert.c \ + $(ACPICA)/components/debugger/dbtest.c \ + $(ACPICA)/components/disassembler/dmbuffer.c \ + $(ACPICA)/components/disassembler/dmcstyle.c \ + $(ACPICA)/components/disassembler/dmnames.c \ + $(ACPICA)/components/disassembler/dmopcode.c \ + $(ACPICA)/components/disassembler/dmresrc.c \ + $(ACPICA)/components/disassembler/dmresrcl.c \ + $(ACPICA)/components/disassembler/dmresrcs.c \ + $(ACPICA)/components/disassembler/dmutils.c \ + $(ACPICA)/components/disassembler/dmwalk.c \ + $(ACPICA)/components/disassembler/dmresrcl2.c \ + $(ACPICA)/components/disassembler/dmdeferred.c \ + $(ACPICA)/components/dispatcher/dsdebug.c \ + $(ACPICA)/components/dispatcher/dsfield.c \ + $(ACPICA)/components/dispatcher/dsinit.c \ + $(ACPICA)/components/dispatcher/dsmethod.c \ + $(ACPICA)/components/dispatcher/dsmthdat.c \ + $(ACPICA)/components/dispatcher/dsobject.c \ + $(ACPICA)/components/dispatcher/dspkginit.c \ + $(ACPICA)/components/dispatcher/dsutils.c \ + $(ACPICA)/components/dispatcher/dswexec.c \ + $(ACPICA)/components/dispatcher/dswload.c \ + $(ACPICA)/components/dispatcher/dswscope.c \ + $(ACPICA)/components/dispatcher/dswstate.c \ + $(ACPICA)/components/dispatcher/dsargs.c \ + $(ACPICA)/components/dispatcher/dswload2.c \ + $(ACPICA)/components/dispatcher/dsopcode.c \ + $(ACPICA)/components/events/evevent.c \ + $(ACPICA)/components/events/evgpe.c \ + $(ACPICA)/components/events/evgpeblk.c \ + $(ACPICA)/components/events/evgpeinit.c \ + $(ACPICA)/components/events/evgpeutil.c \ + $(ACPICA)/components/events/evxfgpe.c \ + $(ACPICA)/components/events/evmisc.c \ + $(ACPICA)/components/events/evregion.c \ + $(ACPICA)/components/events/evrgnini.c \ + $(ACPICA)/components/events/evsci.c \ + $(ACPICA)/components/events/evxface.c \ + $(ACPICA)/components/events/evxfevnt.c \ + $(ACPICA)/components/events/evxfregn.c \ + $(ACPICA)/components/events/evglock.c \ + $(ACPICA)/components/events/evhandler.c \ + $(ACPICA)/components/executer/exconcat.c \ + $(ACPICA)/components/executer/exfield.c \ + $(ACPICA)/components/executer/exfldio.c \ + $(ACPICA)/components/executer/exmisc.c \ + $(ACPICA)/components/executer/exmutex.c \ + $(ACPICA)/components/executer/exnames.c \ + $(ACPICA)/components/executer/exoparg1.c \ + $(ACPICA)/components/executer/exoparg2.c \ + $(ACPICA)/components/executer/exoparg3.c \ + $(ACPICA)/components/executer/exoparg6.c \ + $(ACPICA)/components/executer/exprep.c \ + $(ACPICA)/components/executer/exregion.c \ + $(ACPICA)/components/executer/exresnte.c \ + $(ACPICA)/components/executer/exresolv.c \ + $(ACPICA)/components/executer/exresop.c \ + $(ACPICA)/components/executer/exserial.c \ + $(ACPICA)/components/executer/exstore.c \ + $(ACPICA)/components/executer/exstoren.c \ + $(ACPICA)/components/executer/exstorob.c \ + $(ACPICA)/components/executer/exsystem.c \ + $(ACPICA)/components/executer/extrace.c \ + $(ACPICA)/components/executer/exutils.c \ + $(ACPICA)/components/executer/exconvrt.c \ + $(ACPICA)/components/executer/excreate.c \ + $(ACPICA)/components/executer/exdump.c \ + $(ACPICA)/components/executer/exdebug.c \ + $(ACPICA)/components/executer/exconfig.c \ + $(ACPICA)/components/hardware/hwacpi.c \ + $(ACPICA)/components/hardware/hwgpe.c \ + $(ACPICA)/components/hardware/hwpci.c \ + $(ACPICA)/components/hardware/hwregs.c \ + $(ACPICA)/components/hardware/hwsleep.c \ + $(ACPICA)/components/hardware/hwvalid.c \ + $(ACPICA)/components/hardware/hwxface.c \ + $(ACPICA)/components/hardware/hwxfsleep.c \ + $(ACPICA)/components/hardware/hwesleep.c \ + $(ACPICA)/components/namespace/nsaccess.c \ + $(ACPICA)/components/namespace/nsalloc.c \ + $(ACPICA)/components/namespace/nsdump.c \ + $(ACPICA)/components/namespace/nsdumpdv.c \ + $(ACPICA)/components/namespace/nseval.c \ + $(ACPICA)/components/namespace/nsinit.c \ + $(ACPICA)/components/namespace/nsload.c \ + $(ACPICA)/components/namespace/nsnames.c \ + $(ACPICA)/components/namespace/nsobject.c \ + $(ACPICA)/components/namespace/nsparse.c \ + $(ACPICA)/components/namespace/nspredef.c \ + $(ACPICA)/components/namespace/nsrepair.c \ + $(ACPICA)/components/namespace/nsrepair2.c \ + $(ACPICA)/components/namespace/nssearch.c \ + $(ACPICA)/components/namespace/nsutils.c \ + $(ACPICA)/components/namespace/nswalk.c \ + $(ACPICA)/components/namespace/nsxfeval.c \ + $(ACPICA)/components/namespace/nsxfname.c \ + $(ACPICA)/components/namespace/nsxfobj.c \ + $(ACPICA)/components/namespace/nsconvert.c \ + $(ACPICA)/components/namespace/nsprepkg.c \ + $(ACPICA)/components/namespace/nsarguments.c \ + $(ACPICA)/components/parser/psargs.c \ + $(ACPICA)/components/parser/psloop.c \ + $(ACPICA)/components/parser/psopcode.c \ + $(ACPICA)/components/parser/psparse.c \ + $(ACPICA)/components/parser/psscope.c \ + $(ACPICA)/components/parser/pstree.c \ + $(ACPICA)/components/parser/psutils.c \ + $(ACPICA)/components/parser/pswalk.c \ + $(ACPICA)/components/parser/psxface.c \ + $(ACPICA)/components/parser/psopinfo.c \ + $(ACPICA)/components/parser/psobject.c \ + $(ACPICA)/components/resources/rsaddr.c \ + $(ACPICA)/components/resources/rscalc.c \ + $(ACPICA)/components/resources/rscreate.c \ + $(ACPICA)/components/resources/rsdump.c \ + $(ACPICA)/components/resources/rsio.c \ + $(ACPICA)/components/resources/rsinfo.c \ + $(ACPICA)/components/resources/rsirq.c \ + $(ACPICA)/components/resources/rslist.c \ + $(ACPICA)/components/resources/rsmemory.c \ + $(ACPICA)/components/resources/rsmisc.c \ + $(ACPICA)/components/resources/rsutils.c \ + $(ACPICA)/components/resources/rsxface.c \ + $(ACPICA)/components/resources/rsserial.c \ + $(ACPICA)/components/resources/rsdumpinfo.c \ + $(ACPICA)/components/tables/tbdata.c \ + $(ACPICA)/components/tables/tbfadt.c \ + $(ACPICA)/components/tables/tbfind.c \ + $(ACPICA)/components/tables/tbinstal.c \ + $(ACPICA)/components/tables/tbutils.c \ + $(ACPICA)/components/tables/tbxface.c \ + $(ACPICA)/components/tables/tbxfroot.c \ + $(ACPICA)/components/tables/tbxfload.c \ + $(ACPICA)/components/tables/tbprint.c \ + $(ACPICA)/components/utilities/utaddress.c \ + $(ACPICA)/components/utilities/utalloc.c \ + $(ACPICA)/components/utilities/utascii.c \ + $(ACPICA)/components/utilities/utcache.c \ + $(ACPICA)/components/utilities/utcopy.c \ + $(ACPICA)/components/utilities/utdebug.c \ + $(ACPICA)/components/utilities/utdelete.c \ + $(ACPICA)/components/utilities/uteval.c \ + $(ACPICA)/components/utilities/utglobal.c \ + $(ACPICA)/components/utilities/uthex.c \ + $(ACPICA)/components/utilities/utids.c \ + $(ACPICA)/components/utilities/utinit.c \ + $(ACPICA)/components/utilities/utlock.c \ + $(ACPICA)/components/utilities/utmath.c \ + $(ACPICA)/components/utilities/utmisc.c \ + $(ACPICA)/components/utilities/utmutex.c \ + $(ACPICA)/components/utilities/utnonansi.c \ + $(ACPICA)/components/utilities/utobject.c \ + $(ACPICA)/components/utilities/utresdecode.c \ + $(ACPICA)/components/utilities/utresrc.c \ + $(ACPICA)/components/utilities/utstate.c \ + $(ACPICA)/components/utilities/utstrtoul64.c \ + $(ACPICA)/components/utilities/uttrack.c \ + $(ACPICA)/components/utilities/utosi.c \ + $(ACPICA)/components/utilities/utxferror.c \ + $(ACPICA)/components/utilities/utxface.c \ + $(ACPICA)/components/utilities/utdecode.c \ + $(ACPICA)/components/utilities/utexcep.c \ + $(ACPICA)/components/utilities/utpredef.c \ + $(ACPICA)/components/utilities/utstring.c \ + $(ACPICA)/components/utilities/utstrsuppt.c \ + $(ACPICA)/components/utilities/utownerid.c \ + $(ACPICA)/components/utilities/utxfinit.c \ + $(ACPICA)/components/utilities/uterror.c \ + $(ACPICA)/components/utilities/utbuffer.c \ + $(ACPICA)/components/utilities/utuuid.c \ + $(ACPICA)/common/acfileio.c \ + $(ACPICA)/common/acgetline.c \ + $(ACPICA)/common/ahids.c \ + $(ACPICA)/common/cmfsize.c \ + $(ACPICA)/common/ahtable.c \ + $(ACPICA)/common/ahuuids.c \ + $(ACPICA)/tools/acpiexec/aeinitfile.c \ + $(ACPICA)/tools/acpiexec/aehandlers.c \ + $(ACPICA)/tools/acpiexec/aeexception.c \ + $(ACPICA)/tools/acpiexec/aeregion.c \ + $(ACPICA)/tools/acpiexec/aeinstall.c \ + $(ACPICA)/os_specific/service_layers/osgendbg.c + +libfwtsacpica_la_LIBADD = \ + -L$(top_builddir)/src/lib/src -lfwts -lrt + diff --git a/src/acpica/fwts_acpica.c b/src/libfwtsacpica/fwts_acpica.c similarity index 100% rename from src/acpica/fwts_acpica.c rename to src/libfwtsacpica/fwts_acpica.c diff --git a/src/libfwtsiasl/Makefile.am b/src/libfwtsiasl/Makefile.am new file mode 100644 index 00000000..37c6fcef --- /dev/null +++ b/src/libfwtsiasl/Makefile.am @@ -0,0 +1,312 @@ +# +# Copyright (C) 2011-2019 Canonical, Ltd. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# + +# +# We need to build this as a separate shared library with the iasl functionality built in. We +# just export the fwts_* interface. +# +AUTOMAKE_OPTIONS = subdir-objects + +ACPICA = $(top_srcdir)/src/acpica/source + +AM_CPPFLAGS = -Wall -Wstrict-prototypes \ + -fno-strict-aliasing \ + -D_LINUX \ + -DACPI_ASL_COMPILER $(CFLAGS) \ + -I$(ACPICA)/include \ + -I$(ACPICA)/compiler + +AM_YFLAGS = -d + +# +# Case in-sensitive scanning +# +AM_LFLAGS = -i + +ASL_PARSER = \ + $(ACPICA)/compiler/aslcstyle.y \ + $(ACPICA)/compiler/aslhelpers.y \ + $(ACPICA)/compiler/aslparser.y \ + $(ACPICA)/compiler/aslprimaries.y \ + $(ACPICA)/compiler/aslresources.y \ + $(ACPICA)/compiler/aslrules.y \ + $(ACPICA)/compiler/aslsupport.y \ + $(ACPICA)/compiler/asltokens.y \ + $(ACPICA)/compiler/asltypes.y + +ASL_LEXER = + $(ACPICA)/compiler/aslcompiler.l \ + $(srcdir)/aslsupport.l \ + $(srcdir)/aslcompiler.y.h + +$(srcdir)/aslcompiler.y: $(ASL_PARSER) + m4 -P -I$(ACPICA)/compiler $(ACPICA)/compiler/aslparser.y > $@ + +$(srcdir)/aslcompilerlex.c: $(ASL_LEXER) + ${LEX} ${AM_LFLAGS} -PAslCompiler -o$@ $(ACPICA)/compiler/aslcompiler.l + +.NOTPARALLEL: $(srcdir)/aslcompiler.c +$(srcdir)/aslcompiler.c $(srcdir)/aslcompiler.y.h: $(srcdir)/aslcompiler.y + ${YACC} ${AM_YFLAGS} -d -baslcompiler -pAslCompiler $^ + mv aslcompiler.tab.c aslcompiler.c + mv aslcompiler.tab.h aslcompiler.y.h + +.NOTPARALLEL: $(srcdir)/dtparserlex.c +$(srcdir)/dtparserlex.c $(srcdir)/dtparser.c $(srcdir)/dtparser.y.h: $(ACPICA)/compiler/dtparser.l $(ACPICA)/compiler/dtparser.y + ${LEX} ${AM_LFLAGS} -PDtParser -o$(srcdir)/dtparserlex.c $< + ${YACC} ${AM_YFLAGS} -bdtparser -pDtParser $(ACPICA)/compiler/dtparser.y + mv dtparser.tab.c dtparser.c + mv dtparser.tab.h dtparser.y.h + +.NOTPARALLEL: $(srcdir)/prparserlex.c +$(srcdir)/prparserlex.c $(srcdir)/prparser.c $(srcdir)/prparser.y.h: $(ACPICA)/compiler/prparser.l $(ACPICA)/compiler/prparser.y + ${LEX} ${AM_LFLAGS} -PPrParser -o$(srcdir)/prparserlex.c $< + ${YACC} ${AM_YFLAGS} -bprparser -pPrParser $(ACPICA)/compiler/prparser.y + mv prparser.tab.c prparser.c + mv prparser.tab.h prparser.y.h + +pkglib_LTLIBRARIES = libfwtsiasl.la + +BUILT_SOURCES = aslcompiler.y \ + aslcompiler.y.h \ + aslcompilerlex.c \ + aslcompiler.c \ + dtparser.y.h \ + dtparserlex.c \ + dtparser.c \ + prparser.y.h \ + prparserlex.c \ + prparser.c + +# +# Just export fwts specific API so we don't clash with core ACPICA library +# +libfwtsiasl_la_LDFLAGS = -export-symbols-regex "fwts_.*" -lpthread -version-info 1:0:0 + +CLEANFILES = $(BUILT_SOURCES) + +libfwtsiasl_la_CPPFLAGS = $(AM_CPPFLAGS) +libfwtsiasl_la_SOURCES = \ + fwts_iasl_interface.c \ + aslcompilerlex.c \ + aslcompiler.c \ + dtparserlex.c \ + dtparser.c \ + prparserlex.c \ + prparser.c \ + $(ACPICA)/common/adisasm.c \ + $(ACPICA)/common/acfileio.c \ + $(ACPICA)/common/adfile.c \ + $(ACPICA)/common/adwalk.c \ + $(ACPICA)/common/ahids.c \ + $(ACPICA)/common/ahpredef.c \ + $(ACPICA)/common/ahtable.c \ + $(ACPICA)/common/ahuuids.c \ + $(ACPICA)/compiler/aslallocate.c \ + $(ACPICA)/compiler/aslanalyze.c \ + $(ACPICA)/compiler/aslascii.c \ + $(ACPICA)/compiler/aslbtypes.c \ + $(ACPICA)/compiler/aslcache.c \ + $(ACPICA)/compiler/aslcodegen.c \ + $(ACPICA)/compiler/aslcompile.c \ + $(ACPICA)/compiler/asldebug.c \ + $(ACPICA)/compiler/aslerror.c \ + $(ACPICA)/compiler/aslexternal.c \ + $(ACPICA)/compiler/aslfiles.c \ + $(ACPICA)/compiler/aslfileio.c \ + $(ACPICA)/compiler/aslfold.c \ + $(ACPICA)/compiler/aslhelp.c \ + $(ACPICA)/compiler/aslhex.c \ + $(ACPICA)/compiler/asllength.c \ + $(ACPICA)/compiler/asllisting.c \ + $(ACPICA)/compiler/asllistsup.c \ + $(ACPICA)/compiler/aslload.c \ + $(ACPICA)/compiler/asllookup.c \ + $(ACPICA)/compiler/aslmain.c \ + $(ACPICA)/compiler/aslmap.c \ + $(ACPICA)/compiler/aslmapenter.c \ + $(ACPICA)/compiler/aslmapoutput.c \ + $(ACPICA)/compiler/aslmaputils.c \ + $(ACPICA)/compiler/aslmessages.c \ + $(ACPICA)/compiler/aslmethod.c \ + $(ACPICA)/compiler/aslnamesp.c \ + $(ACPICA)/compiler/asloffset.c \ + $(ACPICA)/compiler/aslopcodes.c \ + $(ACPICA)/compiler/asloperands.c \ + $(ACPICA)/compiler/aslopt.c \ + $(ACPICA)/compiler/asloptions.c \ + $(ACPICA)/compiler/aslparseop.c \ + $(ACPICA)/compiler/aslpredef.c \ + $(ACPICA)/compiler/aslprepkg.c \ + $(ACPICA)/compiler/aslprintf.c \ + $(ACPICA)/compiler/aslprune.c \ + $(ACPICA)/compiler/aslresource.c \ + $(ACPICA)/compiler/aslrestype1.c \ + $(ACPICA)/compiler/aslrestype1i.c \ + $(ACPICA)/compiler/aslrestype2.c \ + $(ACPICA)/compiler/aslrestype2d.c \ + $(ACPICA)/compiler/aslrestype2e.c \ + $(ACPICA)/compiler/aslrestype2q.c \ + $(ACPICA)/compiler/aslrestype2s.c \ + $(ACPICA)/compiler/aslrestype2w.c \ + $(ACPICA)/compiler/aslstartup.c \ + $(ACPICA)/compiler/aslstubs.c \ + $(ACPICA)/compiler/aslpld.c \ + $(ACPICA)/compiler/asltransform.c \ + $(ACPICA)/compiler/asltree.c \ + $(ACPICA)/compiler/aslutils.c \ + $(ACPICA)/compiler/asluuid.c \ + $(ACPICA)/compiler/aslwalks.c \ + $(ACPICA)/compiler/aslxref.c \ + $(ACPICA)/compiler/aslxrefout.c \ + $(ACPICA)/compiler/cvcompiler.c \ + $(ACPICA)/compiler/cvdisasm.c \ + $(ACPICA)/compiler/cvparser.c \ + $(ACPICA)/common/cmfsize.c \ + $(ACPICA)/components/debugger/dbfileio.c \ + $(ACPICA)/components/disassembler/dmbuffer.c \ + $(ACPICA)/components/disassembler/dmcstyle.c \ + $(ACPICA)/components/disassembler/dmdeferred.c \ + $(ACPICA)/common/dmextern.c \ + $(ACPICA)/components/disassembler/dmnames.c \ + $(ACPICA)/components/disassembler/dmopcode.c \ + $(ACPICA)/components/disassembler/dmresrc.c \ + $(ACPICA)/components/disassembler/dmresrcl.c \ + $(ACPICA)/components/disassembler/dmresrcl2.c \ + $(ACPICA)/components/disassembler/dmresrcs.c \ + $(ACPICA)/common/dmrestag.c \ + $(ACPICA)/common/dmswitch.c \ + $(ACPICA)/common/dmtable.c \ + $(ACPICA)/common/dmtables.c \ + $(ACPICA)/common/dmtbdump.c \ + $(ACPICA)/common/dmtbdump1.c \ + $(ACPICA)/common/dmtbdump2.c \ + $(ACPICA)/common/dmtbdump3.c \ + $(ACPICA)/common/dmtbinfo.c \ + $(ACPICA)/common/dmtbinfo1.c \ + $(ACPICA)/common/dmtbinfo2.c \ + $(ACPICA)/common/dmtbinfo3.c \ + $(ACPICA)/components/disassembler/dmutils.c \ + $(ACPICA)/components/disassembler/dmwalk.c \ + $(ACPICA)/components/dispatcher/dsargs.c \ + $(ACPICA)/components/dispatcher/dscontrol.c \ + $(ACPICA)/components/dispatcher/dsfield.c \ + $(ACPICA)/components/dispatcher/dsobject.c \ + $(ACPICA)/components/dispatcher/dsopcode.c \ + $(ACPICA)/components/dispatcher/dspkginit.c \ + $(ACPICA)/components/dispatcher/dsutils.c \ + $(ACPICA)/components/dispatcher/dswexec.c \ + $(ACPICA)/components/dispatcher/dswload.c \ + $(ACPICA)/components/dispatcher/dswload2.c \ + $(ACPICA)/components/dispatcher/dswscope.c \ + $(ACPICA)/components/dispatcher/dswstate.c \ + $(ACPICA)/compiler/dtcompile.c \ + $(ACPICA)/compiler/dtexpress.c \ + $(ACPICA)/compiler/dtfield.c \ + $(ACPICA)/compiler/dtio.c \ + $(ACPICA)/compiler/dtsubtable.c \ + $(ACPICA)/compiler/dttable.c \ + $(ACPICA)/compiler/dttable1.c \ + $(ACPICA)/compiler/dttable2.c \ + $(ACPICA)/compiler/dttemplate.c \ + $(ACPICA)/compiler/dtutils.c \ + $(ACPICA)/components/executer/exconcat.c \ + $(ACPICA)/components/executer/exconvrt.c \ + $(ACPICA)/components/executer/excreate.c \ + $(ACPICA)/components/executer/exdump.c \ + $(ACPICA)/components/executer/exmisc.c \ + $(ACPICA)/components/executer/exmutex.c \ + $(ACPICA)/components/executer/exnames.c \ + $(ACPICA)/components/executer/exoparg1.c \ + $(ACPICA)/components/executer/exoparg2.c \ + $(ACPICA)/components/executer/exoparg3.c \ + $(ACPICA)/components/executer/exoparg6.c \ + $(ACPICA)/components/executer/exprep.c \ + $(ACPICA)/components/executer/exregion.c \ + $(ACPICA)/components/executer/exresnte.c \ + $(ACPICA)/components/executer/exresolv.c \ + $(ACPICA)/components/executer/exresop.c \ + $(ACPICA)/components/executer/exstore.c \ + $(ACPICA)/components/executer/exstoren.c \ + $(ACPICA)/components/executer/exstorob.c \ + $(ACPICA)/components/executer/exsystem.c \ + $(ACPICA)/components/executer/exutils.c \ + $(ACPICA)/common/getopt.c \ + $(ACPICA)/components/namespace/nsaccess.c \ + $(ACPICA)/components/namespace/nsalloc.c \ + $(ACPICA)/components/namespace/nsdump.c \ + $(ACPICA)/components/namespace/nsnames.c \ + $(ACPICA)/components/namespace/nsobject.c \ + $(ACPICA)/components/namespace/nsparse.c \ + $(ACPICA)/components/namespace/nssearch.c \ + $(ACPICA)/components/namespace/nsutils.c \ + $(ACPICA)/components/namespace/nswalk.c \ + $(ACPICA)/components/namespace/nsxfobj.c \ + $(ACPICA)/os_specific/service_layers/osunixxf.c \ + $(ACPICA)/compiler/prexpress.c \ + $(ACPICA)/compiler/prmacros.c \ + $(ACPICA)/compiler/prscan.c \ + $(ACPICA)/compiler/prutils.c \ + $(ACPICA)/components/parser/psargs.c \ + $(ACPICA)/components/parser/psloop.c \ + $(ACPICA)/components/parser/psobject.c \ + $(ACPICA)/components/parser/psopcode.c \ + $(ACPICA)/components/parser/psopinfo.c \ + $(ACPICA)/components/parser/psparse.c \ + $(ACPICA)/components/parser/psscope.c \ + $(ACPICA)/components/parser/pstree.c \ + $(ACPICA)/components/parser/psutils.c \ + $(ACPICA)/components/parser/pswalk.c \ + $(ACPICA)/components/tables/tbdata.c \ + $(ACPICA)/components/tables/tbfadt.c \ + $(ACPICA)/components/tables/tbinstal.c \ + $(ACPICA)/components/tables/tbprint.c \ + $(ACPICA)/components/tables/tbutils.c \ + $(ACPICA)/components/tables/tbxface.c \ + $(ACPICA)/components/tables/tbxfload.c \ + $(ACPICA)/components/utilities/utaddress.c \ + $(ACPICA)/components/utilities/utalloc.c \ + $(ACPICA)/components/utilities/utascii.c \ + $(ACPICA)/components/utilities/utbuffer.c \ + $(ACPICA)/components/utilities/utcache.c \ + $(ACPICA)/components/utilities/utcopy.c \ + $(ACPICA)/components/utilities/utdebug.c \ + $(ACPICA)/components/utilities/utdecode.c \ + $(ACPICA)/components/utilities/utdelete.c \ + $(ACPICA)/components/utilities/uterror.c \ + $(ACPICA)/components/utilities/utexcep.c \ + $(ACPICA)/components/utilities/utglobal.c \ + $(ACPICA)/components/utilities/uthex.c \ + $(ACPICA)/components/utilities/utinit.c \ + $(ACPICA)/components/utilities/utlock.c \ + $(ACPICA)/components/utilities/utmath.c \ + $(ACPICA)/components/utilities/utmisc.c \ + $(ACPICA)/components/utilities/utmutex.c \ + $(ACPICA)/components/utilities/utnonansi.c \ + $(ACPICA)/components/utilities/utobject.c \ + $(ACPICA)/components/utilities/utownerid.c \ + $(ACPICA)/components/utilities/utpredef.c \ + $(ACPICA)/components/utilities/utresdecode.c \ + $(ACPICA)/components/utilities/utresrc.c \ + $(ACPICA)/components/utilities/utstate.c \ + $(ACPICA)/components/utilities/utstrtoul64.c \ + $(ACPICA)/components/utilities/utstrsuppt.c \ + $(ACPICA)/components/utilities/utstring.c \ + $(ACPICA)/components/utilities/utuuid.c \ + $(ACPICA)/components/utilities/utxface.c \ + $(ACPICA)/components/utilities/utxferror.c diff --git a/src/acpica/source/compiler/fwts_iasl_interface.c b/src/libfwtsiasl/fwts_iasl_interface.c similarity index 100% rename from src/acpica/source/compiler/fwts_iasl_interface.c rename to src/libfwtsiasl/fwts_iasl_interface.c diff --git a/src/acpica/source/compiler/fwts_iasl_interface.h b/src/libfwtsiasl/fwts_iasl_interface.h similarity index 100% rename from src/acpica/source/compiler/fwts_iasl_interface.h rename to src/libfwtsiasl/fwts_iasl_interface.h