mysu_anon/external-libs/Makefile

74 lines
2.9 KiB
Makefile
Raw Normal View History

2022-09-07 19:31:20 +00:00
FLAVOUR = monero
NPROC=16
2022-09-07 19:31:20 +00:00
all: arm64-v8a armeabi-v7a x86_64 include/wallet2_api.h VERSION
debug: arm64-v8a armeabi-v7a include/wallet2_api.h VERSION
2022-09-07 19:31:20 +00:00
arm64-v8a: $(FLAVOUR) android64.Dockerfile
-rm -rf arm64-v8a
-docker container rm $(FLAVOUR)-android-arm64 -f
docker build -f android64.Dockerfile -t $(FLAVOUR)-android-arm64 $(FLAVOUR) --build-arg NPROC=$(NPROC)
2022-09-07 19:31:20 +00:00
docker create -it --name $(FLAVOUR)-android-arm64 $(FLAVOUR)-android-arm64 bash
mkdir arm64-v8a
2022-09-07 19:31:20 +00:00
docker cp $(FLAVOUR)-android-arm64:/opt/android/prefix/lib/. arm64-v8a/
docker cp $(FLAVOUR)-android-arm64:/src/build/release/lib/. arm64-v8a/$(FLAVOUR)
armeabi-v7a: $(FLAVOUR) android32.Dockerfile
-rm -rf armeabi-v7a
-docker container rm $(FLAVOUR)-android-arm32 -f
docker build -f android32.Dockerfile -t $(FLAVOUR)-android-arm32 $(FLAVOUR) --build-arg NPROC=$(NPROC)
2022-09-07 19:31:20 +00:00
docker create -it --name $(FLAVOUR)-android-arm32 $(FLAVOUR)-android-arm32 bash
mkdir armeabi-v7a
2022-09-07 19:31:20 +00:00
docker cp $(FLAVOUR)-android-arm32:/opt/android/prefix/lib/. armeabi-v7a
docker cp $(FLAVOUR)-android-arm32:/src/build/release/lib/. armeabi-v7a/$(FLAVOUR)
x86_64: $(FLAVOUR) android64_x86.Dockerfile
-rm -rf x86_64
-docker container rm $(FLAVOUR)-android-x86_64 -f
docker build -f android64_x86.Dockerfile -t $(FLAVOUR)-android-x86_64 $(FLAVOUR) --build-arg NPROC=$(NPROC)
2022-09-07 19:31:20 +00:00
docker create -it --name $(FLAVOUR)-android-x86_64 $(FLAVOUR)-android-x86_64 bash
mkdir x86_64
2022-09-07 19:31:20 +00:00
docker cp $(FLAVOUR)-android-x86_64:/opt/android/prefix/lib/. x86_64
docker cp $(FLAVOUR)-android-x86_64:/src/build/release/lib/. x86_64/$(FLAVOUR)
x86: $(FLAVOUR) android32_x86.Dockerfile
-rm -rf x86
-docker container rm $(FLAVOUR)-android-x86 -f
docker build -f android32_x86.Dockerfile -t $(FLAVOUR)-android-x86 $(FLAVOUR) --build-arg NPROC=$(NPROC)
2022-09-07 19:31:20 +00:00
docker create -it --name $(FLAVOUR)-android-x86 $(FLAVOUR)-android-x86 bash
mkdir x86
2022-09-07 19:31:20 +00:00
docker cp $(FLAVOUR)-android-x86:/opt/android/prefix/lib/. x86
docker cp $(FLAVOUR)-android-x86:/src/build/release/lib/. x86/$(FLAVOUR)
include/wallet2_api.h: $(FLAVOUR) include $(FLAVOUR)/src/wallet/api/wallet2_api.h
cp $(FLAVOUR)/src/wallet/api/wallet2_api.h include/wallet2_api.h
include:
mkdir include
VERSION:
echo MONERUJO_$(FLAVOUR) `git -C . branch | grep "^\*" | sed 's/^..//'` with $(FLAVOUR) `git -C $(FLAVOUR) branch | grep "^\*" | sed 's/^..//'` > VERSION
clean:
-rm -rf arm64-v8a
-rm -rf armeabi-v7a
-rm -rf x86_64
-rm -rf x86
-rm -rf include
-rm -f VERSION
distclean: clean
-docker container rm $(FLAVOUR)-android-arm64 -f
-docker container rm $(FLAVOUR)-android-arm32 -f
-docker container rm $(FLAVOUR)-android-x86_64 -f
-docker container rm $(FLAVOUR)-android-x86 -f
-docker image rm $(FLAVOUR)-android-arm64 -f
-docker image rm $(FLAVOUR)-android-arm32 -f
-docker image rm $(FLAVOUR)-android-x86_64 -f
-docker image rm $(FLAVOUR)-android-x86 -f
-rm $(FLAVOUR)
$(FLAVOUR):
$(error Please ln -s $(FLAVOUR))
.PHONY: all clean distclean