Directory structure changes
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.
This commit is contained in:
parent
edb7475318
commit
68ca649688
11 changed files with 43 additions and 3 deletions
12
.gitignore
vendored
Normal file
12
.gitignore
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
*
|
||||
|
||||
!.gitignore
|
||||
!Makefile
|
||||
!**/
|
||||
|
||||
*.o
|
||||
*.a
|
||||
.cproject
|
||||
.project
|
||||
.settings/language.settings.xml
|
||||
|
28
Makefile
Normal file
28
Makefile
Normal file
|
@ -0,0 +1,28 @@
|
|||
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
|
|
@ -1,4 +1,4 @@
|
|||
#include "multiaddr.h"
|
||||
#include "multiaddr/multiaddr.h"
|
||||
//ADD TO PROTOUTILS.H
|
||||
|
||||
int main()
|
||||
|
|
2
varint.c
2
varint.c
|
@ -1,4 +1,4 @@
|
|||
#include "varint.h"
|
||||
#include "multiaddr/varint.h"
|
||||
|
||||
|
||||
DEFN_ENCODER(32)
|
||||
|
|
Loading…
Reference in a new issue