Skip to content

Commit

Permalink
makefile: add include path into env variable CGO_CFLAGS.
Browse files Browse the repository at this point in the history
Use absolute paths in CFLAGS and LDFLAGS.

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
  • Loading branch information
cfc4n committed Feb 24, 2024
1 parent 47e20ea commit 65b2ed8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ define allow-override
endef

define gobuild
CGO_CFLAGS='-O2 -g -gdwarf-4' \
CGO_LDFLAGS='-O2 -g -L./lib/libpcap -lpcap -static' \
CGO_CFLAGS='-O2 -g -gdwarf-4 -I$(CURDIR)/lib/libpcap/' \
CGO_LDFLAGS='-O2 -g -L$(CURDIR)/lib/libpcap -lpcap -static' \
GOOS=linux GOARCH=$(GOARCH) CC=$(CMD_CLANG) \
$(CMD_GO) build -tags $(TARGET_TAG) -ldflags "-w -s -X 'ecapture/cli/cmd.GitVersion=$(TARGET_TAG)_$(UNAME_M):$(VERSION):$(VERSION_FLAG)' -X 'main.enableCORE=$(ENABLECORE)'" -o $(OUT_BIN)
$(OUT_BIN) -v
Expand Down

0 comments on commit 65b2ed8

Please sign in to comment.