Adjusted makefiles

yamux
John Jones 2016-11-07 16:34:08 -05:00
parent 79820e54bf
commit 6f3be52801
6 changed files with 52 additions and 1 deletions

14
Makefile Normal file
View File

@ -0,0 +1,14 @@
OBJS = crypto/rsa.o crypto/encoding/asn1.o crypto/encoding/base58.o crypto/encoding/base64.o \
crypto/encoding/x509.o thirdparty/mbedtls/*.o
all:
cd crypto; make all;
cd thirdparty; make all;
ar rcs libp2p.a $(OBJS)
clean:
cd crypto; make clean;
cd thirdparty; make clean
rm -rf libp2p.a

16
crypto/Makefile Normal file
View File

@ -0,0 +1,16 @@
CC = gcc
CFLAGS = -O0 -I../include
LFLAGS =
DEPS =
OBJS = rsa.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: $(OBJS)
cd encoding; make all;
clean:
rm -f *.o
cd encoding; make clean;

14
crypto/encoding/Makefile Normal file
View File

@ -0,0 +1,14 @@
CC = gcc
CFLAGS = -O0 -I../../include
LFLAGS =
DEPS =
OBJS = asn1.o base58.o base64.o x509.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
all: $(OBJS)
clean:
rm -f *.o

View File

@ -7,6 +7,8 @@
#include <string.h>
#include <math.h>
#include <stdint.h>
#include <sys/types.h>
static const char b58digits_ordered[] = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";

5
thirdparty/Makefile vendored Normal file
View File

@ -0,0 +1,5 @@
all:
cd mbedtls; make all;
clean:
cd mbedtls; make clean;

View File

@ -1,7 +1,7 @@
# Also see "include/mbedtls/config.h"
CFLAGS ?= -O2
CFLAGS ?= -O2 -I../../include
WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement
LDFLAGS ?=