Skip to content

Commit

Permalink
Improving Makefile to full build MF distro to locally install in ~/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Jan 5, 2024
1 parent 97a881d commit ac49b6d
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,19 @@ clean-app:

.PHONY: git-subs-update
git-subs-update: ## update Git submodules
@echo "Initializing sub-modules with cmark-gfm and other dependencies..."
cd .. && git submodule update --init --recursive


../deps/cmark-gfm/build: git-subs-update
@echo "Building cmark-gfm and other dependencies..."
cd ../deps/cmark-gfm \
&& mkdir -p build && cd build \
&& cmake -DCMARK_TESTS=OFF -DCMARK_SHARED=OFF .. \
&& cmake --build . \
; cd ../../../build


.PHONY: gen-lib-class
gen-lib-class: ## generate lib C++ class skeleton: CLASS_NAME=My_Class
@echo "Generating lib C++ class for name: $(CLASS_NAME)"
Expand All @@ -86,9 +96,14 @@ gen-ui-class: ## generate UI C++ class skeleton: CLASS_NAME=My_Class
#


../app/mindforger:
../Makefile:
@echo "Generating Makefile..."
cd .. && qmake -r mindforger.pro ; cd build


../app/mindforger: ../Makefile
@echo "Building PRODUCTION MindForger executable..."
cd .. && qmake -r mindforger.pro && make -j $(CPU_CORES) ; cd ..
cd .. && make -j $(CPU_CORES) ; cd build
@echo "If build succeeded, then MindForger executable can be found in:\n app/mindforger"
ls -al ../app/mindforger

Expand Down Expand Up @@ -154,7 +169,7 @@ run-dev: build-dev ## run MindForger development build
# install
#

install-dev-local: clean build-rc ## install MindForger RC build to ~/bin as 'mind' executable
install-dev-local: ../deps/cmark-gfm/build ../Makefile ../lib/tests/Makefile clean build-rc ## install MindForger RC build to ~/bin as 'mind' executable
cp -vf ../app/mindforger ~/bin
mv -vf ~/bin/mindforger ~/bin/mind
~/bin/mind --version
Expand All @@ -175,6 +190,11 @@ ver-find: ## pre-version update finder
cd .. && git grep -n "1\.55"


../lib/tests/Makefile:
@echo "Generating lib test Makefile..."
cd ../lib/test && qmake -r mindforger-lib-unit-tests.pro ; cd ../../build


test-lib: clean ## compile and run lib/ unit tests
cd make && ./test-lib-units.sh

Expand Down

0 comments on commit ac49b6d

Please sign in to comment.