From 8b964acedbed06e769f3c81dd0170ee53f6ba98e Mon Sep 17 00:00:00 2001 From: Norayr Chilingarian Date: Tue, 7 Feb 2023 23:09:03 +0400 Subject: [PATCH] builds with GNUMakefile --- GNUmakefile | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 8 +++++--- 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 GNUmakefile diff --git a/GNUmakefile b/GNUmakefile new file mode 100644 index 0000000..a780713 --- /dev/null +++ b/GNUmakefile @@ -0,0 +1,52 @@ +VOC = /opt/voc/bin/voc +mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +mkfile_dir_path := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) +build_dir_path := $(mkfile_dir_path)/build +current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) +BLD := $(mkfile_dir_path)/build +DPS := $(mkfile_dir_path)/dps + +all: get_deps build_deps vipack +#Internet lists opts skprJson skprLogger time +get_deps: + mkdir -p $(DPS) + if [ -d $(DPS)/lists ]; then cd $(DPS)/lists; git pull; cd -; else cd $(DPS); git clone https://github.com/norayr/lists; cd -; fi + if [ -d $(DPS)/Internet ]; then cd $(DPS)/Internet; git pull; cd -; else cd $(DPS); git clone https://github.com/norayr/Internet; cd -; fi + if [ -d $(DPS)/time ]; then cd $(DPS)/time; git pull; cd -; else cd $(DPS); git clone https://github.com/norayr/time; cd -; fi + if [ -d $(DPS)/opts ]; then cd $(DPS)/opts; git pull; cd -; else cd $(DPS); git clone https://github.com/norayr/opts; cd -; fi + if [ -d $(DPS)/skprLogger ]; then cd $(DPS)/skprLogger; git pull; cd -; else cd $(DPS); git clone https://github.com/norayr/skprLogger; cd -; fi + if [ -d $(DPS)/skprJson ]; then cd $(DPS)/skprJson; git pull; cd -; else cd $(DPS); git clone https://github.com/norayr/skprJson; cd -; fi + +build_deps: + mkdir -p $(BLD) + cd $(CURDIR)/$(BUILD) + make -f $(DPS)/lists/GNUmakefile BUILD=$(BLD) + make -f $(DPS)/Internet/GNUmakefile BUILD=$(BLD) + make -f $(DPS)/time/GNUmakefile BUILD=$(BLD) + make -f $(DPS)/opts/GNUmakefile BUILD=$(BLD) + make -f $(DPS)/skprLogger/GNUmakefile BUILD=$(BLD) + make -f $(DPS)/skprJson/GNUmakefile BUILD=$(BLD) + +vipack: + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkSettings.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/unix/vpkLinuxFiles.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/unix/vpkTime.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkLogger.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkHttp.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/unix/vpkEnv.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/unix/vpkGit.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkCharacterStack.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkJsonParser.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkConf.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkStorage.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkSyncer.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkdepTree.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkDot.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkResolver.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkJsonDepRetriever.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vpkInstaller.Mod + cd $(BLD) && $(VOC) $(mkfile_dir_path)/src/vipack.Mod -m + + +clean: + if [ -d "$(BLD)" ]; then rm -rf $(BLD); fi diff --git a/Makefile b/Makefile index f63dcce..81f2ea4 100644 --- a/Makefile +++ b/Makefile @@ -3,10 +3,12 @@ CFLAGS = # The following order is important, do not alphabetise -DEPS = norayr/lists \ - norayr/Internet \ +DEPS = norayr/lists \ + norayr/Internet \ norayr/opts \ - norayr/time + norayr/time \ + norayr/skprLogger \ + norayr/skprJson GITHUB = https://github.com/