2016-11-14 13:03:48 +00:00
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -O0 -I include
|
|
|
|
|
2017-02-13 22:49:20 +00:00
|
|
|
DEBUG = true
|
|
|
|
|
|
|
|
|
2016-11-14 13:03:48 +00:00
|
|
|
ifdef DEBUG
|
|
|
|
CFLAGS += -g3
|
|
|
|
endif
|
|
|
|
|
2016-12-05 11:56:09 +00:00
|
|
|
LFLAGS = -lm
|
2016-11-14 13:03:48 +00:00
|
|
|
DEPS = include/multiaddr/base58.h include/multiaddr/endian.h include/multiaddr/multiaddr.h \
|
|
|
|
include/multiaddr/protocols.h include/multiaddr/protoutils.h include/multiaddr/varhexutils.h \
|
|
|
|
include/multiaddr/varint.h
|
2017-02-13 18:25:43 +00:00
|
|
|
OBJS = base58.o varint.o varhexutils.o protoutils.o protocols.o multiaddr.o
|
2016-11-14 13:03:48 +00:00
|
|
|
|
|
|
|
%.o: %.c $(DEPS)
|
|
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
|
|
|
|
libmultiaddr.a: $(OBJS)
|
|
|
|
ar rcs $@ $^
|
|
|
|
|
2016-12-05 11:56:09 +00:00
|
|
|
test_multiaddr: testing.o libmultiaddr.a
|
2016-11-14 13:03:48 +00:00
|
|
|
$(CC) -o $@ $^ $(LFLAGS)
|
|
|
|
|
|
|
|
all: test_multiaddr
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
rm -f libmultiaddr.a
|
|
|
|
rm -f test_multiaddr
|