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.
This commit is contained in:
parent
ccabb8c0ac
commit
d3858ffc26
18 changed files with 23 additions and 31 deletions
3
Makefile
3
Makefile
|
@ -2,7 +2,8 @@
|
|||
DEBUG = true
|
||||
export DEBUG
|
||||
|
||||
LINKER_FLAGS=
|
||||
ROOT= $(shell pwd)
|
||||
export INCLUDE = -I$(ROOT)/include -I$(ROOT)/../c-protobuf -I$(ROOT)/../c-multihash/include -I$(ROOT)/../c-multiaddr/include
|
||||
|
||||
OBJS = \
|
||||
conn/*.o \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -I../../c-multiaddr/include -g3
|
||||
CFLAGS = $(INCLUDE) -O0 -g3
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = dialer.o transport_dialer.o connection.o tcp_transport_dialer.o session.o
|
||||
|
@ -7,7 +7,6 @@ OBJS = dialer.o transport_dialer.o connection.o tcp_transport_dialer.o session.o
|
|||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -g3
|
||||
export CFLAGS = $(INCLUDE) -O0 -g3
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = rsa.o sha256.o sha512.o sha1.o key.o peerutils.o ephemeral.o aes.o
|
||||
|
@ -7,7 +7,6 @@ OBJS = rsa.o sha256.o sha512.o sha1.o key.o peerutils.o ephemeral.o aes.o
|
|||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
cd encoding; make all;
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../../include -g3 -std=c99
|
||||
LFLAGS =
|
||||
DEPS = ../../include/libp2p/crypto/encoding/base58.h ../../include/libp2p/crypto/encoding/base64.h \
|
||||
../../include/libp2p/crypto/encoding/x509.h ../../include/libp2p/crypto/encoding/base16.h \
|
||||
|
@ -7,8 +6,7 @@ DEPS = ../../include/libp2p/crypto/encoding/base58.h ../../include/libp2p/crypto
|
|||
OBJS = base58.o base64.o x509.o base16.o base32.o
|
||||
|
||||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
$(CC) -c -o $@ $< $(CFLAGS) -std=c99
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -I../../c-multiaddr/include -g3 -std=c99
|
||||
CFLAGS = $(INCLUDE) -O0 -g3 -std=c99
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = datastore.o filestore.o
|
||||
|
@ -7,7 +7,6 @@ OBJS = datastore.o filestore.o
|
|||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -g3
|
||||
CFLAGS = $(INCLUDE) -O0 -g3
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = hashmap.o
|
||||
|
@ -7,7 +7,6 @@ OBJS = hashmap.o
|
|||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -Werror -I../include -I../../c-protobuf -std=c11
|
||||
CFLAGS = $(INCLUDE) -O0 -Wall -Werror -std=c11
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-protobuf -I../../c-multiaddr/include
|
||||
CFLAGS = $(INCLUDE) -O0 -Wall
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-protobuf
|
||||
CFLAGS = $(INCLUDE) -O0 -Wall
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -I../../c-multiaddr/include -g3
|
||||
CFLAGS = $(INCLUDE) -O0 -g3
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = utils.o memstream.o
|
||||
|
@ -7,7 +7,6 @@ OBJS = utils.o memstream.o
|
|||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -I../../c-multiaddr/include -g3 -std=c11
|
||||
CFLAGS = $(INCLUDE) -O0 -g3 -std=c11
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = peer.o peerstore.o providerstore.o
|
||||
|
@ -7,7 +7,6 @@ OBJS = peer.o peerstore.o providerstore.o
|
|||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-protobuf -I../../c-multihash/include -I../../c-multiaddr/include -g3
|
||||
CFLAGS = $(INCLUDE) -O0 -g3
|
||||
LFLAGS =
|
||||
DEPS =
|
||||
OBJS = record.o message.o message_handler.o
|
||||
|
@ -7,7 +7,6 @@ OBJS = record.o message.o message_handler.o
|
|||
%.o: %.c $(DEPS)
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
|
||||
all: $(OBJS)
|
||||
|
||||
clean:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
DHT_DIR = dht
|
||||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I../../c-multiaddr/include -I$(DHT_DIR) -g3
|
||||
CFLAGS = $(INCLUDE) -I$(DHT_DIR) -O0 -g3
|
||||
LFLAGS =
|
||||
DEPS = # $(DHT_DIR)/dht.h
|
||||
OBJS = kademlia.o dht.o dht_protocol.o
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-protobuf -I../../c-multiaddr/include -std=c99
|
||||
CFLAGS = $(INCLUDE) -O0 -Wall -std=c99
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-protobuf -I../../c-multiaddr/include -std=c99
|
||||
CFLAGS = $(INCLUDE) -O0 -Wall -std=c99
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -I../include -I. -I../../c-multihash/include -I../../c-multiaddr/include -std=c11
|
||||
CFLAGS = $(INCLUDE) -O0 -std=c11
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -I../include -I../../c-multiaddr/include -std=c99
|
||||
CFLAGS = $(INCLUDE) -O0 -Wall -std=c99
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CC = gcc
|
||||
CFLAGS = -O0 -Wall -Werror -I../include -I../../c-protobuf -std=c11
|
||||
CFLAGS = $(INCLUDE) -O0 -Wall -Werror -std=c11
|
||||
|
||||
ifdef DEBUG
|
||||
CFLAGS += -g3
|
||||
|
|
Loading…
Reference in a new issue