Merge pull request #1 from jmjatlanta/master
Directory structure changes
This commit is contained in:
commit
50dbd5f765
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
|
//ADD TO PROTOUTILS.H
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
|
|
4
varint.c
4
varint.c
|
@ -1,8 +1,8 @@
|
||||||
#include "varint.h"
|
#include "multiaddr/varint.h"
|
||||||
|
|
||||||
|
|
||||||
DEFN_ENCODER(32)
|
DEFN_ENCODER(32)
|
||||||
DEFN_DECODER(32)
|
DEFN_DECODER(32)
|
||||||
|
|
||||||
DEFN_ENCODER(64)
|
DEFN_ENCODER(64)
|
||||||
DEFN_DECODER(64)
|
DEFN_DECODER(64)
|
||||||
|
|
Loading…
Reference in a new issue