blob: 4f88b0a74c96bb493f7de0a08ee4e0a6d1473392 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
patching libziparchive.mk to build in yocto environment.
Changes include:
Introduced an output folder which will keep all the outputs from the
android-tools.
Adding an include file that is setting the common flags.
Changed the cppflag to include the headers from other components
of android-tools
Modified LDflags so that the libraries that are coming from other android-tools
are searched in the output folder.
Modified the build rule so that it outputs the binary to the OUT_DIR
Signed-off-by: Nisha Parrakat <Nisha.Parrakat@kpit.com>
Upstream-Status: Pending
--- git/system/core/debian/libziparchive.mk 2021-05-17 08:13:41.684459540 +0000
+++ git/system/core/debian/libziparchive.mk 2021-05-17 08:16:19.293722572 +0000
@@ -1,3 +1,4 @@
+include ../../rules_yocto.mk
NAME = libziparchive
SOURCES = zip_archive.cc \
zip_archive_stream_entry.cc\
@@ -5,14 +6,15 @@
SOURCES := $(foreach source, $(SOURCES), libziparchive/$(source))
CXXFLAGS += -std=gnu++17
CPPFLAGS += -DZLIB_CONST -D_FILE_OFFSET_BITS=64 \
- -Iinclude -Ibase/include -Ilibziparchive/include
+ -Iinclude -Ibase/include -Ilibziparchive/include -I$(OUT_DIR)/usr/include/
LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 \
-Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
- -lz -L. -llog -lbase
+ -lz -L$(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android -llog -lbase
build: $(SOURCES)
- $(CXX) $^ -o $(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
- ln -s $(NAME).so.0 $(NAME).so
+ $(CXX) $^ -o $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)
+ ln -sf $(NAME).so.0 $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so
+ cp -r libziparchive/include/* $(OUT_DIR)/usr/include/
clean:
- $(RM) $(NAME).so*
+ $(RM) $(OUT_DIR)/usr/lib/$(DEB_HOST_MULTIARCH)/android/$(NAME).so*
|