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: $(GCC_COM) $(file_libs) && echo && ./tests.sh release: gcc -O3 $(GCC_ARGS) $(file_libs) && strip ./$(exe) && echo && ./tests.sh notest: $(GCC_COM) $(file_libs) local: gcc -g -O0 -Wall -o $(exe) -D STANDALONE -DSCRIPTDIR=\"$(mkfile_dir)/examples\" $(file_libs) val: $(GCC_COM) $(file_libs) && ./tests.sh -val 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)