c-libp2p/test/Makefile
Radu Iliescu d3858ffc26 Makefile: refactor include files
Now major include files are comming from main Makefile,
module need to add just their specific include path.
To work make the include path absolute.
2018-11-29 07:15:27 -05:00

28 lines
593 B
Makefile

CC = gcc
CFLAGS = $(INCLUDE) -O0 -std=c11
ifdef DEBUG
CFLAGS += -g3
endif
LFLAGS = -L../ -L../../c-multihash -L../../c-multiaddr
DEPS = crypto/test_base58.h crypto/test_rsa.h test_mbedtls.h
OBJS = testit.o ../../c-protobuf/protobuf.o ../../c-protobuf/varint.o ../libp2p.a
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
testit_libp2p: $(OBJS) $(DEPS)
$(CC) -o $@ $(OBJS) $(LFLAGS) -lp2p -lm -lmultihash -lmultiaddr -lpthread
all_others:
cd ../crypto; make all;
cd ../thirdparty; make all;
all: all_others testit_libp2p
clean:
rm -f *.o
rm -f testit_libp2p
test: clean testit_libp2p