Link rasctl with -lpthread, updated cross-compiler default setting (#508)

* Link rasctl with -lpthread, as -lprotobuf may require it

* Made non-cross compiling the default setting

* Comment update

* No need for initial definition of CROSS_COMPILE

* Update
This commit is contained in:
Uwe Seimet 2021-12-06 20:45:44 +01:00 committed by GitHub
parent 47717ad0e0
commit 5ec5a5f730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,10 @@
.DEFAULT_GOAL: all
## Optional build flags:
## CROSS_COMPILE=arm-linux-gnueabihf- : Specify which compiler
## toolchain to use. This will default to arm-linux-
## gnueabihf-, which is typical on a Raspberry Pi.
## To cross compile on a x86_64 system set these to:
## ARM=x86_64 CROSS_COMPILE=x86_64-linux-gnu-cpp
CROSS_COMPILE ?= arm-linux-gnueabihf-
## CROSS_COMPILE : Specify which compiler toolchain to use.
## To cross compile set this accordingly, e.g. to:
## arm-linux-gnueabihf-
CROSS_COMPILE =
CC = $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++
@ -172,7 +170,7 @@ $(BINDIR)/$(RASCSI): $(SRC_PROTOBUF) $(OBJ_RASCSI) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASCSI) -lpthread -lz -lpcap -lprotobuf -lstdc++fs
$(BINDIR)/$(RASCTL): $(SRC_PROTOBUF) $(OBJ_RASCTL) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASCTL) -lprotobuf -lstdc++fs
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASCTL) -lpthread -lprotobuf -lstdc++fs
$(BINDIR)/$(RASDUMP): $(OBJ_RASDUMP) | $(BINDIR)
$(CXX) $(CXXFLAGS) -o $@ $(OBJ_RASDUMP)