Makefile 647 Bytes
Newer Older
1 2
CFLAGS+=-Ibuild/include
#LDFLAGS+=-pthread
3
LDFLAGS=-Lbuild/lib -lzmq -rpath $$ORIGIN/build/lib
4 5

default: lumberjack
6 7
include Makefile.ext

8
unixsock.c: build/include/insist.h
9
lumberjack.c: build/include/insist.h backoff.h build/include/zeromq.h
10

11
lumberjack: lumberjack.o backoff.o build/lib/libzmq.$(LIBEXT)
12 13 14 15

build/include/insist.h: | build/include
	curl -s -o $@ https://raw.github.com/jordansissel/experiments/master/c/better-assert/insist.h

16 17 18
build/include/zeromq.h build/lib/libzmq.$(LIBEXT): | build
	$(MAKE) -C vendor/zeromq/ PREFIX=$$PWD/build

19 20 21 22 23 24
build:
	mkdir $@

build/include: | build
	mkdir $@

25 26
clean:
	-rm -fr lumberjack unixsock *.o build