Add basic Makefile.

This commit is contained in:
Evgeny Chernyavskiy 2020-04-03 15:56:11 -04:00 committed by Jakub Vrána
parent 75cd1c3f28
commit 1e1c46ac72

39
Makefile Normal file
View file

@ -0,0 +1,39 @@
ROOT_DIRECTORY = $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))")
PHP := $(shell which php)
PORT := 8000
.DEFAULT_GOAL := default
.PHONY: default
default: compile
.PHONY: compile
compile:
$(PHP) $(ROOT_DIRECTORY)/compile.php
.PHONY: server
server:
php \
--server 127.0.0.1:$(PORT) \
--docroot $(ROOT_DIRECTORY)
.PHONY: initialize
initialize:
git \
-C $(ROOT_DIRECTORY) \
submodule \
update \
--init \
--recursive
.PHONY: clean
clean:
rm \
--recursive \
--force \
$(ROOT_DIRECTORY)/adminer.php
.PHONY: clean.all
clean.all: clean