pebblisp/src/Makefile

40 lines
799 B
Makefile
Raw Normal View History

files = pebblisp.c tokens.c object.c env.c
libs = -lreadline -lmicrohttpd
exe = pl
file_libs := $(files) $(libs)
2021-07-05 00:26:18 -04:00
BINPREFIX ?= /usr/bin
SCRIPTDIR ?= /usr/local/share/pebblisp
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
mkfile_dir := $(dir $(mkfile_path))
GCC_COM ?= gcc -g -O0 -Wall -o $(exe) -D STANDALONE -DSCRIPTDIR=\"$(SCRIPTDIR)\"
2020-05-15 16:27:45 -04:00
all:
$(GCC_COM) $(files) $(libs) && echo && ./tests.sh
2020-05-15 16:27:45 -04:00
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)
2020-05-07 20:32:01 -04:00
2020-05-08 02:29:06 -04:00
run:
./$(exe)
2020-10-29 09:04:32 -04:00
install:
cp -pf ./$(exe) $(BINPREFIX)
mkdir -p $(SCRIPTDIR)
cp ./examples/* $(SCRIPTDIR)
uninstall:
rm $(BINPREFIX)/$(exe)
rm -r $(SCRIPTDIR)