You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
757 B

BSTRLIB_BASE_URL ?= https://raw.githubusercontent.com/websnarf/bstrlib/208b1f2a4dfc96b806ed499bd1909e87ec15981d
PREFIX ?= /usr/local
CFLAGS = -g -Wall -I${PREFIX}/apr/include/apr-1 -I${PREFIX}/apr/include/apr-util-1
LDFLAGS = -L${PREFIX}/apr/lib
LDLIBS = -lapr-1 -pthread -laprutil-1
all: devpkg
devpkg: bstrlib.o db.o shell.o commands.o
prebuild:
sudo mkdir -p /etc/ld.so.conf.d
echo $(DESTDIR)/$(PREFIX)/lib | sudo tee /etc/ld.so.conf.d/devpkg.conf
sudo ldconfig
install: all
install -d $(DESTDIR)/$(PREFIX)/bin/
install devpkg $(DESTDIR)/$(PREFIX)/bin/
clean:
$(RM) *.o
$(RM) devpkg
$(RM) *.dSYM
$(RM) bstrlib.c bstrlib.h
bstrlib.c: bstrlib.h
curl -sSLO $(BSTRLIB_BASE_URL)/bstrlib.c
bstrlib.h:
curl -sSLO $(BSTRLIB_BASE_URL)/bstrlib.h