Skip to content

Commit

Permalink
Added Freebsd build target (Velocidex#1031)
Browse files Browse the repository at this point in the history
  • Loading branch information
scudette authored Apr 23, 2021
1 parent 0dddaf7 commit 4140709
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ darwin:
linux:
go run make.go -v linux

freebsd:
go run make.go -v freebsd

windows:
go run make.go -v windowsDev

Expand Down
2 changes: 1 addition & 1 deletion bin/admin_linux.go → bin/admin_generic.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//+ build: !windows
// +build !windows

package main

Expand Down
11 changes: 11 additions & 0 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,17 @@ func Linux() error {
arch: "amd64"}.Run()
}

func Freebsd() error {
return Builder{
extra_tags: " release yara ",
goos: "freebsd",

// When building on actual freebsd we should have c
// compilers, otherwise disable cgo.
disable_cgo: runtime.GOOS != "freebsd",
arch: "amd64"}.Run()
}

func Aix() error {
return Builder{
extra_tags: " release yara ",
Expand Down
2 changes: 1 addition & 1 deletion utils/file_darwin.go → utils/file_generic.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build darwin
// +build darwin freebsd

package utils

Expand Down

0 comments on commit 4140709

Please sign in to comment.