Added the Makefile file to the project and implemented some environment and help commands in it.

This commit is contained in:
Javier Cicchelli 2023-04-08 20:26:07 +02:00
parent 4be21af7c3
commit 9835846d8e
3 changed files with 44 additions and 1 deletions

View File

@ -125,6 +125,8 @@
46EB332B29E1CE05001D5EAF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
46EB333229E1CFD9001D5EAF /* Libraries */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Libraries; sourceTree = "<group>"; };
46EB333429E1D158001D5EAF /* Shared */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = Shared; sourceTree = "<group>"; };
46EB334929E1D34B001D5EAF /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
46EB334A29E1D3C0001D5EAF /* Makefile */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.make; path = Makefile; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -145,6 +147,7 @@
children = (
46EB333429E1D158001D5EAF /* Shared */,
46EB325729E1BCAB001D5EAF /* Apps */,
46EB334B29E1D3D2001D5EAF /* Others */,
46EB32EE29E1CD20001D5EAF /* Products */,
46EB334229E1D1EC001D5EAF /* Frameworks */,
);
@ -226,6 +229,15 @@
name = Frameworks;
sourceTree = "<group>";
};
46EB334B29E1D3D2001D5EAF /* Others */ = {
isa = PBXGroup;
children = (
46EB334A29E1D3C0001D5EAF /* Makefile */,
46EB334929E1D34B001D5EAF /* README.md */,
);
name = Others;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */

31
Makefile Normal file
View File

@ -0,0 +1,31 @@
# Variables
BREW_FORMULAE := clang-format swiftlint
# --- ENVIRONMENT ---
set-environment: ## Setup your development environment for this project.
ifeq (, $(shell which brew))
@echo "You're required to enter your root password to install HOMEBREW in your Mac."
@sudo true
@curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | sudo -u $$USER bash
else
@echo "Updating HOMEBREW before installing the dependencies. This might take a little while..."
@brew update
endif
@brew install $(BREW_FORMULAE) || brew upgrade $(BREW_FORMULAE)
unset-environment: ## Unset your development environment for this project.
@brew uninstall $(BREW_FORMULAE)
@brew cleanup
# --- HELP ---
# Output the documentation for each of the defined tasks when `help` is called.
# Reference: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## Print the written documentation for all the defined tasks.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help

View File

@ -1,2 +1,2 @@
# deep-linking-assignment
# Deep linking: Wikipedia