68ca649688
Made an include directory to avoid naming conflicts with other projects. Also added a Makefile to help with building the library and testing application. Note: This does not build due to what appears to be a missing codec.h file.
28 lines
No EOL
568 B
Makefile
28 lines
No EOL
568 B
Makefile
CC = gcc
|
|
CFLAGS = -O0 -I include
|
|
|
|
ifdef DEBUG
|
|
CFLAGS += -g3
|
|
endif
|
|
|
|
LFLAGS = -lmultiaddr
|
|
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
|
|
OBJS = base58.o varint.o
|
|
|
|
%.o: %.c $(DEPS)
|
|
$(CC) -c -o $@ $< $(CFLAGS)
|
|
|
|
libmultiaddr.a: $(OBJS)
|
|
ar rcs $@ $^
|
|
|
|
test_multiaddr: libmultiaddr.a testing.o
|
|
$(CC) -o $@ $^ $(LFLAGS)
|
|
|
|
all: test_multiaddr
|
|
|
|
clean:
|
|
rm -f *.o
|
|
rm -f libmultiaddr.a
|
|
rm -f test_multiaddr
|