Merge pull request #1 from jmjatlanta/master

Directory structure changes
This commit is contained in:
xethyrion 2016-11-14 11:03:10 -08:00 committed by GitHub
commit 50dbd5f765
11 changed files with 43 additions and 3 deletions

12
.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
*
!.gitignore
!Makefile
!**/
*.o
*.a
.cproject
.project
.settings/language.settings.xml

28
Makefile Normal file
View 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

View file

@ -1,4 +1,4 @@
#include "multiaddr.h"
#include "multiaddr/multiaddr.h"
//ADD TO PROTOUTILS.H
int main()

View file

@ -1,8 +1,8 @@
#include "varint.h"
#include "multiaddr/varint.h"
DEFN_ENCODER(32)
DEFN_DECODER(32)
DEFN_ENCODER(64)
DEFN_DECODER(64)
DEFN_DECODER(64)