pmt: fix some 2.3.0 missings
This commit is contained in:
@@ -38,8 +38,17 @@ include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libpmt_error
|
||||
LOCAL_SRC_FILES := error.c
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_CFLAGS := $(PMT_CFLAGS)
|
||||
|
||||
include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libpmt_partitiontool
|
||||
LOCAL_SRC_FILES := partition_tool.c
|
||||
LOCAL_SRC_FILES := partitiontool.c
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_CFLAGS := $(PMT_CFLAGS)
|
||||
|
||||
@@ -61,13 +70,13 @@ LOCAL_SRC_FILES := \
|
||||
pmt.c \
|
||||
versioner.c \
|
||||
tools.c \
|
||||
error.c \
|
||||
lang_tools.c \
|
||||
languages.c \
|
||||
docs.c
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_STATIC_LIBRARIES := \
|
||||
libpmt_root \
|
||||
libpmt_error \
|
||||
libpmt_partitiontool \
|
||||
libpmt_list
|
||||
LOCAL_CFLAGS := $(PMT_CFLAGS)
|
||||
|
||||
102
jni/Makefile
Executable file
102
jni/Makefile
Executable file
@@ -0,0 +1,102 @@
|
||||
# By YZBruh
|
||||
|
||||
# Copyright 2024 Partition Manager
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
#####
|
||||
# sub-make for building package
|
||||
#####
|
||||
|
||||
THIS_IS = src
|
||||
|
||||
include ../Makefile.inc
|
||||
|
||||
ifeq ($(INC_OLDENV),true)
|
||||
include ../config/oldenv.mk
|
||||
endif
|
||||
|
||||
define make_obj
|
||||
$(eval OBJ := $(1:.c=.o))
|
||||
$(call m_stat,`basename $(SOURCE_DIR)`/`basename $(OBJ)`)
|
||||
$(CC) $(CFLAGS) -c $1 || exit 1;
|
||||
endef
|
||||
|
||||
define make_executable
|
||||
printf " - Making executable file...\n"; \
|
||||
$(CC) $(CFLAGS) -L$(SOURCE_DIR) -lpmt_root -lpmt_lister -lpmt_partitiontool -o $(TARGET) pmt.o error.o docs.o versioner.o lang_tools.o languages.o || exit 1;
|
||||
endef
|
||||
|
||||
define make_staticlib
|
||||
$(call m_stat,$(1))
|
||||
$(AR) rcs "$1" "$2" || exit 1;
|
||||
endef
|
||||
|
||||
# all target for building
|
||||
all:
|
||||
@rm -f ../config/oldenv.mk; \
|
||||
printf " ---- Partition Manager Builder ---- \n\n"; \
|
||||
printf " - Version: $(VERSION)\n"; \
|
||||
printf " - Version code: $(VERSION_CODE)\n\n"; \
|
||||
printf " -------------------------------- \n\n"; \
|
||||
abort_build() { \
|
||||
if [ -d "$(PACKAGE_DIR)" ]; then \
|
||||
rm -rf "$(PACKAGE_DIR)"; \
|
||||
fi; \
|
||||
if [ -d "$(BINARY_DIR)" ]; then \
|
||||
rm -rf "$(BINARY_DIR)"; \
|
||||
fi; \
|
||||
if [ -d "$(STATICLIB_DIR)" ]; then \
|
||||
rm -rf "$(STATICLIB_DIR)"; \
|
||||
fi; \
|
||||
exit 1; \
|
||||
}; \
|
||||
if [ -f $(SOURCE_DIR)/docs.o ]; then \
|
||||
printf " - Please clean up before you build it.\n\n"; \
|
||||
printf " ----------------------------------- \n"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
printf " - Building objects...\n"; \
|
||||
sleep 2; \
|
||||
$(foreach csrc,$(SRCS),$(call make_obj, $(csrc)))
|
||||
$(call mdir,$(OUT_DIR))
|
||||
$(call mdir,$(BINARY_DIR))
|
||||
$(call mdir,$(PACKAGE_DIR))
|
||||
$(call mdir,$(STATICLIB_DIR))
|
||||
printf " - Building static libraries...\n";
|
||||
$(call make_staticlib,libpmt_root.a,root.o)
|
||||
$(call make_staticlib,libpmt_lister.a,listpart.o)
|
||||
$(call make_staticlib,libpmt_partitiontool.a,partition_tool.o)
|
||||
sleep 1;
|
||||
$(call make_executable)
|
||||
sleep 1;
|
||||
mv pmt $(BINARY_DIR) || abort_build; \
|
||||
mv *.a $(STATICLIB_DIR) || abort_build; \
|
||||
printf " - Generating xz package...\n"; \
|
||||
cp $(BINARY_DIR)/pmt $(PACKAGE_DIR) || abort_build; \
|
||||
xz $(PACKAGE_DIR)/pmt || abort_build; \
|
||||
sleep 1; \
|
||||
mv $(PACKAGE_DIR)/pmt.xz $(PACKAGE_DIR)/pmt-$(ARCH).xz || abort_build; \
|
||||
printf " - Success\n\n"; \
|
||||
sleep 1; \
|
||||
printf " ----------------------------------- \n"
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
$(eval STATICLIBS = $(wildcard $(SOURCE_DIR)/*.a))
|
||||
$(eval OBJS = $(wildcard $(SOURCE_DIR)/*.o))
|
||||
$(info Cleaning files...)
|
||||
$(foreach obj,$(OBJS), $(call m_stat_nn,src/$(shell basename $(obj))) $(call erase,$(obj)))
|
||||
$(foreach lib,$(STATICLIBS),$(call m_stat_nn,src/$(shell basename $(lib))) $(call erase,$(lib)))
|
||||
|
||||
# end
|
||||
@@ -18,6 +18,20 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <android/ndk-version.h>
|
||||
|
||||
#if __NDK_MINOR__ == 1
|
||||
#define __NDK_MINOR_STATUS__ "b"
|
||||
#else
|
||||
#define __NDK_MINOR_STATUS__ ""
|
||||
#endif
|
||||
|
||||
#if __NDK_BETA__ == 1 || __NDK_BETA__ == 2
|
||||
#define __NDK_BETA_STATUS__ "beta"
|
||||
#else
|
||||
#define __NDK_BETA_STATUS__ ""
|
||||
#endif
|
||||
|
||||
/* versioning */
|
||||
#define PMT_MAJOR 2
|
||||
#define PMT_MINOR 3
|
||||
|
||||
@@ -43,7 +43,7 @@ struct pmt_langdb_general en = {
|
||||
.expected_flash_arg = "Expected flash argument 2, retrieved",
|
||||
.expected_format_arg = "Expected format argument 2, retrieved",
|
||||
.missing_operand = "missing operand",
|
||||
.multiple_wiewers = "Multiple wiewers cannot be used at the same line.",
|
||||
.multiple_wiewers = "Multiple viewers cannot be used at the same line.",
|
||||
.common_symbol_rule = "When entering the attached argument of an option, an argument of another option type cannot be used. In short, the rule is: there can be no '-' at the beginning of the attached argument.",
|
||||
.req_part_name = "Required partition name.",
|
||||
.part_not_found = "Partition not found!",
|
||||
@@ -155,7 +155,7 @@ struct pmt_langdb_docs tr_docs = {
|
||||
.docs_strs_l2 = "[SEÇENEKLER] flash DOSYA BÖLÜM [SEÇENEKLER]...",
|
||||
.docs_strs_l3 = "[SEÇENEKLER] format DOSYA_SİSTEMİ[ext/2/3/4] BÖLÜM [SEÇENEKLER]...",
|
||||
.docs_strs_l4 = "Seçenekler",
|
||||
.docs_strs_l5 = "Bu seçeneği kullanarak mantıksal (logical) bir bölümün yedekleneceğini belirtebilirsiniz.",
|
||||
.docs_strs_l5 = "Bu seçeneği kullanarak mantıksal (logical) bir bölümle işlem yapılacağını belirtebilirsiniz.",
|
||||
.docs_strs_l6 = "Bu seçeneği kullanarak özel /dev bağlamı belirtebilirsiniz. Sadece normal (mantıksal olmayan) bölümler içindir (Varsayılan: /dev/block/by-name).",
|
||||
.docs_strs_l7 = "Bölümler listelenir.",
|
||||
.docs_strs_l8 = "Bilgi ve uyarı mesajları susturulur.",
|
||||
|
||||
@@ -231,7 +231,7 @@ int main(int argc, char* argv[])
|
||||
return 1;
|
||||
break;
|
||||
default:
|
||||
printf("%s: %s [backup] flash] [format] [-l | --logical] [-c | --context] [-D | --list] [-v | --version] [--help] [-L | --license]\n", current->usage_head, argv[0]);
|
||||
printf("%s: %s [backup] [flash] [format] [-l | --logical] [-c | --context] [-D | --list] [-v | --version] [--help] [-L | --license]\n", current->usage_head, argv[0]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ void version(void)
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
printf("%s: clang %d.%d.%d\n", current->compiler_str, __clang_major__, __clang_minor__, __clang_patchlevel__);
|
||||
printf("%s: clang %d.%d.%d (NDK r%d%s %s)\n", current->compiler_str, __clang_major__, __clang_minor__, __clang_patchlevel__, __NDK_MAJOR__, __NDK_MINOR_STATUS__, __NDK_BETA_STATUS__);
|
||||
#endif
|
||||
|
||||
printf("%s\n", current->see_license);
|
||||
@@ -54,4 +54,4 @@ void version(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* end of code */
|
||||
/* end of code */
|
||||
Reference in New Issue
Block a user