box-o-sand/lcthw-remnants-2/devpkg/Makefile

31 lines
757 B
Makefile
Raw Normal View History

2016-04-16 06:26:19 +00:00
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