]> git.ozlabs.org Git - ccan/blob - ccan/crypto/shachain/tools/Makefile
crypto/shachain/tools: update to new rbuf API.
[ccan] / ccan / crypto / shachain / tools / Makefile
1 #! /usr/bin/make
2
3 CCANDIR=../../../..
4 CFLAGS=-Wall -Werror -O3 -I$(CCANDIR) -DSHACHAIN_BITS=48
5 #CFLAGS=-Wall -Werror -g3 -I$(CCANDIR) -DSHACHAIN_BITS=48
6
7 # 48 bit index for shachain.  This is what lightning uses.
8 CCAN_OBJS:=ccan-str.o ccan-err.o ccan-hex.o ccan-shachain.o ccan-sha256.o ccan-rbuf.o ccan-membuf.o
9
10 all: shachain48
11
12 shachain48: shachain48.o $(CCAN_OBJS)
13
14 shachain48.o: $(CCANDIR)/ccan/crypto/shachain/shachain.h        \
15         $(CCANDIR)/ccan/str/hex/hex.h                   \
16         $(CCANDIR)/ccan/str/str.h                               \
17         $(CCANDIR)/ccan/err/err.h                               \
18         $(CCANDIR)/ccan/membuf/membuf.h                         \
19         $(CCANDIR)/ccan/rbuf/rbuf.h
20
21 shachain48.o $(CCAN_OBJS): $(CCANDIR)/config.h
22
23 $(CCANDIR)/config.h:
24         $(MAKE) -C $(CCANDIR) config.h
25
26 clean:
27         rm -f shachain *.o
28
29 ccan-err.o: $(CCANDIR)/ccan/err/err.c
30         $(CC) $(CFLAGS) -c -o $@ $<
31 ccan-hex.o: $(CCANDIR)/ccan/str/hex/hex.c
32         $(CC) $(CFLAGS) -c -o $@ $<
33 ccan-str.o: $(CCANDIR)/ccan/str/str.c
34         $(CC) $(CFLAGS) -c -o $@ $<
35 ccan-shachain.o: $(CCANDIR)/ccan/crypto/shachain/shachain.c
36         $(CC) $(CFLAGS) -c -o $@ $<
37 ccan-sha256.o: $(CCANDIR)/ccan/crypto/sha256/sha256.c
38         $(CC) $(CFLAGS) -c -o $@ $<
39 ccan-rbuf.o: $(CCANDIR)/ccan/rbuf/rbuf.c
40         $(CC) $(CFLAGS) -c -o $@ $<
41 ccan-membuf.o: $(CCANDIR)/ccan/membuf/membuf.c
42         $(CC) $(CFLAGS) -c -o $@ $<