40 lines
826 B
Makefile
40 lines
826 B
Makefile
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_COM ?= gcc -g -O0 -Wall -o $(exe) -D WEBSERVER -D STANDALONE -DSCRIPTDIR=\"$(SCRIPTDIR)\"
|
|
|
|
all:
|
|
$(GCC_COM) $(file_libs) && 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)
|