Skip to content

Commit

Permalink
C++ requires CXXFLAGS (not CFLAGS)
Browse files Browse the repository at this point in the history
While here, add -fPIC which is required to link to grpc. Checked on
Linux (Oracle Linux aarch) and FreeBSD (13.2 amd63).
  • Loading branch information
Partmedia committed Nov 27, 2023
1 parent 0179b0a commit 1f50574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# when installing it.
GRPC_ROOT ?= /usr/local
LIBS = -lgrpc -lgpr
CFLAGS = $(shell pkg-config grpc --cflags) -I$(GRPC_ROOT)/include
CXXFLAGS = $(shell pkg-config grpc --cflags) -I$(GRPC_ROOT)/include -fPIC
LDFLAGS = -L$(GRPC_ROOT)/lib $(LIBS)
OFILES = client.o client_auth.o server.o

Expand Down

0 comments on commit 1f50574

Please sign in to comment.