8000 Merge changes from the raft main repo. · postgrespro/postgres_cluster@358d02f · GitHub
[go: up one dir, main page]

Skip to content

Commit 358d02f

Browse files
committed
Merge changes from the raft main repo.
1 parent 89451a4 commit 358d02f

File tree

12 files changed

+1445
-289
lines changed

12 files changed

+1445
-289
lines changed

contrib/raftable/raft/Makefile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#override CC := clang
2-
override CFLAGS += -fpic -Wall -Wfatal-errors -O0 -g -pedantic -std=c99 -D_POSIX_C_SOURCE=200112L
2+
override CFLAGS += -fpic -Wall -Wfatal-errors -O0 -g -pedantic -std=c99 -D_POSIX_C_SOURCE=200112L -D_BSD_SOURCE
33
override CPPFLAGS += -I. -Iinclude #-DDEBUG
4-
override HEART_LDFLAGS += -Llib -lraft -ljansson
4+
override SERVER_LDFLAGS += -Llib -lraft -ljansson
55

66
AR = ar
77
ARFLAGS = -cru
@@ -11,12 +11,15 @@ ARFLAGS = -cru
1111
lib/libraft.a: obj/raft.o obj/util.o | libdir objdir
1212
$(AR) $(ARFLAGS) lib/libraft.a obj/raft.o obj/util.o
1313

14-
all: lib/libraft.a bin/heart
14+
all: lib/libraft.a bin/server bin/client
1515
@echo Done.
1616

17-
bin/heart: obj/heart.o lib/libraft.a | bindir objdir
18-
$(CC) -o bin/heart $(CFLAGS) $(CPPFLAGS) \
19-
obj/heart.o $(HEART_LDFLAGS)
17+
bin/server: obj/server.o lib/libraft.a | bindir objdir
18+
$(CC) -o bin/server $(CFLAGS) $(CPPFLAGS) \
19+
obj/server.o $(SERVER_LDFLAGS)
20+
21+
bin/client: obj/client.o obj/timeout.o | bindir objdir
22+
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $^
2023

2124
obj/%.o: src/%.c | objdir
2225
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

0 commit comments

Comments
 (0)
0