| 1 |
NAME = libaapt2 |
| 2 |
|
| 3 |
|
| 4 |
SOURCES = \ |
| 5 |
cmd/Command.cpp \ |
| 6 |
cmd/Compile.cpp \ |
| 7 |
cmd/Convert.cpp \ |
| 8 |
cmd/Diff.cpp \ |
| 9 |
cmd/Dump.cpp \ |
| 10 |
cmd/Link.cpp \ |
| 11 |
cmd/Optimize.cpp \ |
| 12 |
cmd/Util.cpp \ |
| 13 |
\ |
| 14 |
compile/IdAssigner.cpp \ |
| 15 |
compile/InlineXmlFormatParser.cpp \ |
| 16 |
compile/NinePatch.cpp \ |
| 17 |
compile/Png.cpp \ |
| 18 |
compile/PngChunkFilter.cpp \ |
| 19 |
compile/PngCrunch.cpp \ |
| 20 |
compile/PseudolocaleGenerator.cpp \ |
| 21 |
compile/Pseudolocalizer.cpp \ |
| 22 |
compile/XmlIdCollector.cpp \ |
| 23 |
configuration/ConfigurationParser.cpp \ |
| 24 |
dump/DumpManifest.cpp \ |
| 25 |
filter/AbiFilter.cpp \ |
| 26 |
filter/ConfigFilter.cpp \ |
| 27 |
format/Archive.cpp \ |
| 28 |
format/Container.cpp \ |
| 29 |
format/binary/BinaryResourceParser.cpp \ |
| 30 |
format/binary/ResChunkPullParser.cpp \ |
| 31 |
format/binary/TableFlattener.cpp \ |
| 32 |
format/binary/XmlFlattener.cpp \ |
| 33 |
format/proto/ProtoDeserialize.cpp \ |
| 34 |
format/proto/ProtoSerialize.cpp \ |
| 35 |
io/BigBufferStream.cpp \ |
| 36 |
io/File.cpp \ |
| 37 |
io/FileStream.cpp \ |
| 38 |
io/FileSystem.cpp \ |
| 39 |
io/StringStream.cpp \ |
| 40 |
io/Util.cpp \ |
| 41 |
io/ZipArchive.cpp \ |
| 42 |
link/AutoVersioner.cpp \ |
| 43 |
link/ManifestFixer.cpp \ |
| 44 |
link/NoDefaultResourceRemover.cpp \ |
| 45 |
link/ProductFilter.cpp \ |
| 46 |
link/PrivateAttributeMover.cpp \ |
| 47 |
link/ReferenceLinker.cpp \ |
| 48 |
link/ResourceExcluder.cpp \ |
| 49 |
link/TableMerger.cpp \ |
| 50 |
link/XmlCompatVersioner.cpp \ |
| 51 |
link/XmlNamespaceRemover.cpp \ |
| 52 |
link/XmlReferenceLinker.cpp \ |
| 53 |
optimize/MultiApkGenerator.cpp \ |
| 54 |
optimize/ResourceDeduper.cpp \ |
| 55 |
optimize/ResourceFilter.cpp \ |
| 56 |
optimize/ResourcePathShortener.cpp \ |
| 57 |
optimize/VersionCollapser.cpp \ |
| 58 |
process/SymbolTable.cpp \ |
| 59 |
split/TableSplitter.cpp \ |
| 60 |
text/Printer.cpp \ |
| 61 |
text/Unicode.cpp \ |
| 62 |
text/Utf8Iterator.cpp \ |
| 63 |
util/BigBuffer.cpp \ |
| 64 |
util/Files.cpp \ |
| 65 |
util/Util.cpp \ |
| 66 |
Debug.cpp \ |
| 67 |
DominatorTree.cpp \ |
| 68 |
java/AnnotationProcessor.cpp \ |
| 69 |
java/ClassDefinition.cpp \ |
| 70 |
java/JavaClassGenerator.cpp \ |
| 71 |
java/ManifestClassGenerator.cpp \ |
| 72 |
java/ProguardRules.cpp \ |
| 73 |
LoadedApk.cpp \ |
| 74 |
Resource.cpp \ |
| 75 |
ResourceParser.cpp \ |
| 76 |
ResourceTable.cpp \ |
| 77 |
ResourceUtils.cpp \ |
| 78 |
ResourceValues.cpp \ |
| 79 |
SdkConstants.cpp \ |
| 80 |
StringPool.cpp \ |
| 81 |
trace/TraceBuffer.cpp \ |
| 82 |
xml/XmlActionExecutor.cpp \ |
| 83 |
xml/XmlDom.cpp \ |
| 84 |
xml/XmlPullParser.cpp \ |
| 85 |
xml/XmlUtil.cpp \ |
| 86 |
ValueTransformer.cpp \ |
| 87 |
|
| 88 |
SOURCES := $(foreach source, $(SOURCES), tools/aapt2/$(source)) |
| 89 |
OBJECTS = $(SOURCES:.cpp=.o) |
| 90 |
|
| 91 |
CXXFLAGS += -std=gnu++17 \ |
| 92 |
-fno-rtti \ |
| 93 |
|
| 94 |
CPPFLAGS += \ |
| 95 |
-Icmds/idmap2/libidmap2_policies/include \ |
| 96 |
-Idebian/out/proto/frameworks/base/tools/aapt2 \ |
| 97 |
-Ilibs/androidfw/include \ |
| 98 |
-Itools/aapt2 \ |
| 99 |
-Wno-unused-parameter \ |
| 100 |
-Wno-missing-field-initializers \ |
| 101 |
|
| 102 |
LDFLAGS += \ |
| 103 |
-Ldebian/out \ |
| 104 |
-L/usr/lib/$(DEB_HOST_MULTIARCH)/android \ |
| 105 |
-Wl,-soname,$(NAME).so.0 \ |
| 106 |
-Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \ |
| 107 |
-landroidfw \ |
| 108 |
-lbase \ |
| 109 |
-lexpat \ |
| 110 |
-lpng \ |
| 111 |
-lprotobuf \ |
| 112 |
-shared \ |
| 113 |
|
| 114 |
build: $(OBJECTS) debian/out/aapt2-protobuf.a |
| 115 |
$(CXX) $^ -o debian/out/$(NAME).so.0 $(LDFLAGS) |
| 116 |
ln -sf $(NAME).so.0 debian/out/$(NAME).so |
| 117 |
|
| 118 |
$(OBJECTS): %.o: %.cpp |
| 119 |
$(CXX) -c -o $@ $< $(CXXFLAGS) $(CPPFLAGS) |