files = pebblisp.c tokens.c object.c env.c web.c plfunc.c libs = -lreadline -lmicrohttpd exe = pl file_libs := $(files) $(libs) BINPREFIX ?= /usr/bin SCRIPTDIR ?= /usr/local/share/pebblisp mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) mkfile_dir := $(dir $(mkfile_path)) GCC_ARGS ?= -g -Wall -o $(exe) -D WEBSERVER -D STANDALONE -DSCRIPTDIR=\"$(SCRIPTDIR)\" GCC_COM ?= gcc -O0 $(GCC_ARGS) all: notest echo && ./tests.sh notest: $(GCC_COM) $(file_libs) val: notest ./tests.sh -val release_notest: gcc -O3 $(GCC_ARGS) $(file_libs) && strip ./$(exe) release: release_notest echo && ./tests.sh debug: $(GCC_COM) -D DEBUG $(file_libs) run: ./$(exe) install: cp -pf ./$(exe) $(BINPREFIX) mkdir -p $(SCRIPTDIR) cp -r ./examples/* $(SCRIPTDIR) uninstall: rm $(BINPREFIX)/$(exe) rm -r $(SCRIPTDIR)