Commit f2f8b9a5 authored by Matt Amos's avatar Matt Amos
Browse files

Changes to compile on Linux.

GNU make wanted `VPATH` set so that it could find the source
files. GNU ld complained about missing `-fPIC` for the object
files being linked into a shared library, so added that too.
parent 2b8c06c3
CONTRIB_DIR = . CONTRIB_DIR = .
TEST_DIR = ./tests TEST_DIR = ./tests
LLQUEUE_DIR = $(CONTRIB_DIR)/CLinkedListQueue LLQUEUE_DIR = $(CONTRIB_DIR)/CLinkedListQueue
VPATH = src
GCOV_OUTPUT = *.gcda *.gcno *.gcov GCOV_OUTPUT = *.gcda *.gcno *.gcov
GCOV_CCFLAGS = -fprofile-arcs -ftest-coverage GCOV_CCFLAGS = -fprofile-arcs -ftest-coverage
SHELL = /bin/bash SHELL = /bin/bash
CFLAGS += -Iinclude -Werror -Werror=return-type -Werror=uninitialized -Wcast-align \ CFLAGS += -Iinclude -Werror -Werror=return-type -Werror=uninitialized -Wcast-align \
-Wno-pointer-sign -fno-omit-frame-pointer -fno-common -fsigned-char \ -Wno-pointer-sign -fno-omit-frame-pointer -fno-common -fsigned-char \
$(GCOV_CCFLAGS) -I$(LLQUEUE_DIR) -Iinclude -g -O2 $(GCOV_CCFLAGS) -I$(LLQUEUE_DIR) -Iinclude -g -O2 -fPIC
UNAME := $(shell uname) UNAME := $(shell uname)
...@@ -22,7 +23,7 @@ endif ...@@ -22,7 +23,7 @@ endif
OBJECTS = raft_server.o raft_server_properties.o raft_node.o raft_log.o OBJECTS = raft_server.o raft_server_properties.o raft_node.o raft_log.o
all: static shared all: static shared
clinkedlistqueue: clinkedlistqueue:
mkdir -p $(LLQUEUE_DIR)/.git mkdir -p $(LLQUEUE_DIR)/.git
git --git-dir=$(LLQUEUE_DIR)/.git init git --git-dir=$(LLQUEUE_DIR)/.git init
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment