pmt: initial 2.8.0 update
This commit is contained in:
@@ -31,34 +31,33 @@ PMT_INCDIR := $(INCLUDE_DIR)/pmt
|
||||
|
||||
# the presence of all source files that are on this list will be checked
|
||||
SRCS_REQ := \
|
||||
place-holder/debug.c \
|
||||
place-holder/help.c \
|
||||
place-holder/get_stat.c \
|
||||
place-holder/lang_tools.c \
|
||||
place-holder/languages.c \
|
||||
place-holder/partitiontool.c \
|
||||
place-holder/pmt.c \
|
||||
place-holder/root.c \
|
||||
place-holder/tools.c \
|
||||
place-holder/version.c
|
||||
place-holder/Debug.cpp \
|
||||
place-holder/Help.cpp \
|
||||
place-holder/GetState.cpp \
|
||||
place-holder/LanguageTools.cpp \
|
||||
place-holder/Languages.cpp \
|
||||
place-holder/PartitionTool.cpp \
|
||||
place-holder/PartitionManager.cpp \
|
||||
place-holder/Root.cpp \
|
||||
place-holder/Tools.cpp \
|
||||
place-holder/Version.cpp
|
||||
|
||||
# objects to be used when executable file is created
|
||||
OBJS_EXEC := \
|
||||
$(SOURCE_DIR)/$(TARGET).o \
|
||||
$(SOURCE_DIR)/help.o \
|
||||
$(SOURCE_DIR)/version.o \
|
||||
$(SOURCE_DIR)/get_stat.o \
|
||||
$(SOURCE_DIR)/tools.o \
|
||||
$(SOURCE_DIR)/lang_tools.o \
|
||||
$(SOURCE_DIR)/languages.o
|
||||
$(SOURCE_DIR)/PartitionManager.o \
|
||||
$(SOURCE_DIR)/Help.o \
|
||||
$(SOURCE_DIR)/Version.o \
|
||||
$(SOURCE_DIR)/GetState.o \
|
||||
$(SOURCE_DIR)/Tools.o \
|
||||
$(SOURCE_DIR)/Languages.o \
|
||||
$(SOURCE_DIR)/LanguageTools.o
|
||||
|
||||
HEADERS_REQ := \
|
||||
$(PMT_INCDIR)/pmt/ExternC.h \
|
||||
$(PMT_INCDIR)/pmt/Deprecates.h \
|
||||
$(PMT_INCDIR)/pmt/HelpMessages.h \
|
||||
$(PMT_INCDIR)/pmt/pmt.h \
|
||||
$(PMT_INCDIR)/pmt/StringKeys.h \
|
||||
$(PMT_INCDIR)/pmt/VersionVars.h
|
||||
$(PMT_INCDIR)/PartitionManager/Deprecates.h \
|
||||
$(PMT_INCDIR)/PartitionManager/HelpFn.h \
|
||||
$(PMT_INCDIR)/PartitionManager/PartitionManager.h \
|
||||
$(PMT_INCDIR)/PartitionManager/StringKeys.h \
|
||||
$(PMT_INCDIR)/PartitionManager/VersionFnVars.h
|
||||
|
||||
PROGRESS_LIST := \
|
||||
welcome \
|
||||
@@ -74,12 +73,6 @@ PROGRESS_LIST := \
|
||||
wait \
|
||||
end_progress
|
||||
|
||||
define check_hf
|
||||
@ [ ! -f "$1" ] \
|
||||
&& $(E_NS) " ==> Couldn't found required header file: include/pmt/`basename $1`" \
|
||||
&& exit 1
|
||||
endef
|
||||
|
||||
# all target for building
|
||||
all: $(PROGRESS_LIST)
|
||||
|
||||
@@ -92,11 +85,6 @@ welcome:
|
||||
&& $(E_NS)
|
||||
$(E) " -------------------------------- " \
|
||||
&& $(E_NS)
|
||||
@ if [ -f $(SOURCE_DIR)/debug.o ]; then \
|
||||
$(E_NS) " - Please clean up before you build it." && echo; \
|
||||
$(E_NS) " ----------------------------------- "; \
|
||||
exit 1; \
|
||||
fi
|
||||
$(E) " - Checking required source files..."
|
||||
|
||||
pr_obj:
|
||||
@@ -110,11 +98,11 @@ wait:
|
||||
|
||||
make_outdirs:
|
||||
@ rm -rf $(IN_OUT_DIR)
|
||||
@ mkdir $(BINARY_DIR)
|
||||
@ mkdir $(PACKAGE_DIR)
|
||||
@ mkdir $(STATICLIB_DIR)
|
||||
@ mkdir -p $(BINARY_DIR)
|
||||
@ mkdir -p $(PACKAGE_DIR)
|
||||
@ mkdir -p $(STATICLIB_DIR)
|
||||
|
||||
place-holder/%.c:
|
||||
place-holder/%.cpp:
|
||||
$(E) " CHK $(SOURCE_DIRNAME)/`basename $@`"
|
||||
@ if [ ! -f "$(SOURCE_DIR)/`basename $@`" ]; then \
|
||||
$(E_NS) " ==> Couldn't found required source file: $(SOURCE_DIRNAME)/`basename $@`"; \
|
||||
@@ -122,24 +110,36 @@ place-holder/%.c:
|
||||
fi
|
||||
|
||||
$(PMT_INCDIR)/%.h:
|
||||
$(E) " CHK include/pmt/`basename $@`"
|
||||
@ if [ ! -f "$(INCLUDE_DIR)/pmt/`basename $@`" ]; then \
|
||||
$(E_NS) " ==> Couldn't found required header file: include/pmt/`basename $@`"; \
|
||||
$(E) " CHK include/PartitionManager/`basename $@`"
|
||||
@ if [ ! -f "$(INCLUDE_DIR)/PartitionManager/`basename $@`" ]; then \
|
||||
$(E_NS) " ==> Couldn't found required header file: include/PartitionManager/`basename $@`"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
$(SOURCE_DIR)/%.o: $(SOURCE_DIR)/%.c
|
||||
$(E) " CC $(SOURCE_DIRNAME)/`basename $@`"
|
||||
@ $(CC) $(CFLAGS) -c "$<" || exit 1
|
||||
$(SOURCE_DIR)/%.o: $(SOURCE_DIR)/%.cpp
|
||||
$(E) " CXX $(SOURCE_DIRNAME)/`basename $@`"
|
||||
@ $(CXX) -x c++ $(CXXFLAGS) -c "$<" || exit 1
|
||||
|
||||
$(TARGET)_%:
|
||||
pmt_root:
|
||||
$(E) " AR lib$@.a"
|
||||
@ $(AR) rcs "lib$@.a" "$(SOURCE_DIR)/$$(echo "$@" | cut -d'_' -f2).o"
|
||||
@ $(AR) rcs "lib$@.a" "$(SOURCE_DIR)/Root.o"
|
||||
|
||||
pmt_debug:
|
||||
$(E) " AR lib$@.a"
|
||||
@ $(AR) rcs "lib$@.a" "$(SOURCE_DIR)/Debug.o"
|
||||
|
||||
pmt_listpartitions:
|
||||
$(E) " AR lib$@.a"
|
||||
@ $(AR) rcs "lib$@.a" "$(SOURCE_DIR)/ListPartitions.o"
|
||||
|
||||
pmt_partitiontool:
|
||||
$(E) " AR lib$@.a"
|
||||
@ $(AR) rcs "lib$@.a" "$(SOURCE_DIR)/PartitionTool.o"
|
||||
|
||||
make_executable:
|
||||
$(E) " - Making executable file..."
|
||||
$(E) " LD $(TARGET)"
|
||||
@ $(CC) $(CFLAGS) -L$(SOURCE_DIR) $(foreach st,$(STATIC_LIBS),$(shell echo -n -l$(st) )) -o $(TARGET) $(OBJS_EXEC) || exit 1
|
||||
@ $(CXX) $(CXXFLAGS) -L$(SOURCE_DIR) $(foreach st,$(STATIC_LIBS),$(shell echo -n -l$(st) )) -o $(TARGET) $(OBJS_EXEC) || exit 1
|
||||
|
||||
end_progress:
|
||||
@ abort_build() { \
|
||||
|
||||
Reference in New Issue
Block a user