Skip to content

Commit

Permalink
Try to add pkg-config diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
hillu committed Nov 20, 2024
1 parent 61343b2 commit ce5b29f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ $(if $(findstring x86_64-linux,$(3rdparty_NATIVE_ARCH)),\
$(EXE) unit-test: private export CGO_ENABLED=1
$(EXE) unit-test: private export PATH := $(CURDIR)/_3rdparty/tgt/bin:$(PATH)
$(EXE): private extldflags = $(if $(findstring darwin,$(GOOS)),,-static)
$(EXE): private export PKG_CONFIG_DEBUG_SPEW=1

# Build resource files
%_resource_windows_amd64.syso: %.rc
Expand All @@ -93,6 +94,7 @@ unit-test:
$(info [+] test_flags=$(test_flags) test_pathspec=$(test_pathspec))
$(info [+] GOROOT=$(GOROOT) GOOS=$(GOOS) GOARCH=$(GOARCH) CC=$(CC))
$(info [+] PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
$(info [+] PKG_CONFIG_PATH=$(PKG_CONFIG_PATH))
$(GOROOT)/bin/go test $(test_flags) \
-ldflags '-w -s -linkmode=external -extldflags "$(extldflags)"' \
-tags yara_static \
Expand All @@ -107,6 +109,8 @@ $(EXE):
$(info [+] Building spyre...)
$(info [+] GOROOT=$(GOROOT) GOOS=$(GOOS) GOARCH=$(GOARCH) CC=$(CC))
$(info [+] PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
$(info [+] PKG_CONFIG_PATH=$(PKG_CONFIG_PATH))
pkg-config --list-package-names
mkdir -p $(@D)
$(GOROOT)/bin/go build \
-ldflags '$(VERSIONDEF) -w -s -linkmode=external -extldflags "$(extldflags)"' \
Expand Down

0 comments on commit ce5b29f

Please sign in to comment.