diff --git a/.gitmodules b/.gitmodules index e80f5f6..d218363 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,6 @@ -[submodule "Internet"] - path = Internet - url = https://github.com/norayr/Internet -[submodule "lists"] - path = lists - url = https://github.com/norayr/lists [submodule "dps/opts"] path = dps/opts url = git@github.com:norayr/opts +[submodule "dps/time"] + path = dps/time + url = git@github.com:norayr/time diff --git a/dps/time b/dps/time new file mode 160000 index 0000000..c17a1c7 --- /dev/null +++ b/dps/time @@ -0,0 +1 @@ +Subproject commit c17a1c7d884c5238f3d532bc8943c4121b25bf88 diff --git a/makefile b/makefile index d11acc6..b35ca66 100644 --- a/makefile +++ b/makefile @@ -1,26 +1,25 @@ +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 VOC = voc VERSION_FILE = ./VersionFile.json -BUILDDIR = build +BLD = build VIPACK = vipack all: - git submodule init - git submodule update - mkdir -p $(BUILDDIR) - #later like this: - #cd Internet && make - #cd lists && make - cd $(BUILDDIR) && \ + #git submodule init + #git submodule update + mkdir -p $(build_dir_path) + cd $(build_dir_path) + make -f $(mkfile_dir_path)/dps/lists/makefile BUILD=$(build_dir_path) + make -f $(mkfile_dir_path)/dps/Internet/makefile BUILD=$(build_dir_path) + make -f $(mkfile_dir_path)/dps/time/makefile BUILD=$(build_dir_path) + make -f $(mkfile_dir_path)/dps/opts/makefile BUILD=$(build_dir_path) + cd $(build_dir_path) && \ $(VOC) -s \ - ../Internet/src/netTypes.Mod \ - ../Internet/src/netdb.Mod \ - ../Internet/src/netSockets.Mod \ - ../Internet/src/Internet.Mod \ - ../lists/src/lDefs.Mod \ - ../lists/src/strutils.Mod \ - ../lists/src/List.Mod \ - ../lists/src/StringList.Mod \ ../src/vpkSettings.Mod \ ../src/unix/vpkFiles.Mod \ ../src/unix/vpkTime.Mod \ @@ -41,13 +40,13 @@ all: ../src/vipack.Mod -m tests: - mkdir -p $(BUILDDIR) - cd $(BUILDDIR) && $(VOC) -s ../src/unix/vpkFiles.Mod ../tst/testFiles.Mod -m - cd $(BUILDDIR) && $(VOC) -s ../src/vpkJsonParser.Mod ../tst/testJsonParser.Mod -m + mkdir -p $(BLD) + cd $(BLD) && $(VOC) -s ../src/unix/vpkFiles.Mod ../tst/testFiles.Mod -m + cd $(BLD) && $(VOC) -s ../src/vpkJsonParser.Mod ../tst/testJsonParser.Mod -m mkfifo /tmp/fifo - $(BUILDDIR)/testFiles + $(BLD)/testFiles rm /tmp/fifo - $(BUILDDIR)/testJsonParser + $(BLD)/testJsonParser clean: - if [ -d "$(BUILDDIR)" ]; then rm -rf $(BUILDDIR); fi + if [ -d "$(BLD)" ]; then rm -rf $(BLD); fi