Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask-vpn
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vladimir KozLove
bitmask-vpn
Commits
eb5b2d35
Commit
eb5b2d35
authored
5 years ago
by
Kali Kaneko
Browse files
Options
Downloads
Patches
Plain Diff
[pkg] build binaries into platform folder
parent
cecab719
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+11
-19
11 additions, 19 deletions
Makefile
with
11 additions
and
19 deletions
Makefile
+
11
−
19
View file @
eb5b2d35
...
...
@@ -18,13 +18,15 @@ SYSTRAY = 0xacab.org/leap/bitmask-vpn
GOSYSTRAY
=
${
GOPATH
}
/src/
${
SYSTRAY
}
# detect OS, we use it for dependencies
UNAME
=
`
uname
`
UNAME
=
$(
shell
uname
-s
)
PLATFORM
?=
$(
shell
echo
${
UNAME
}
|
awk
"{print tolower(
\$
$0
)
}"
)
TEMPLATES
=
branding/templates
SCRIPTS
=
branding/scripts
all
:
icon locales build
#########################################################################
# go build
#########################################################################
...
...
@@ -52,26 +54,14 @@ dependsDarwin:
dependsCygwin
:
choco
install
-y
golang python nssm nsis wget 7zip
get
:
-
@mkdir
-p
${
GOPATH
}
/src/0xacab.org/leap
ifeq
(,$(wildcard ${GOSYSTRAY}))
else
@
rm
-rf
${
GOSYSTRAY
}
endif
@
ln
-s
`
pwd
`
${
GOSYSTRAY
}
@
cd
${
GOSYSTRAY
}
&&
go get
-tags
$(
TAGS
)
./...
@
cd
${
GOSYSTRAY
}
&&
go get
-tags
"
$(
TAGS
)
bitmaskd"
./...
@
echo
"Done with go get."
build
:
$(foreach path
,
$(wildcard cmd/*)
,
build_$(patsubst cmd/%
,
%
,
$(path))) build_done
build_%
:
go build
-tags
$(
TAGS
)
-ldflags
"-s -w -X main.version=
`
git describe
--tags
`
"
-o
$*
./cmd/
$*
@
mkdir
-p
build/bin
@
mv
$*
build/bin/
-
@rm
-rf
build/
${
PROVIDER
}
/staging
&&
mkdir
-p
build/
${
PROVIDER
}
/staging
-
@ln
-s
../../bin/
$*
build/
${
PROVIDER
}
/staging/
$*
@
mkdir
-p
build/bin/
${
PLATFORM
}
go build
-tags
$(
TAGS
)
-ldflags
"-s -w -X main.version=
`
git describe
--tags
`
"
-o
build/bin/
${
PLATFORM
}
/
$*
./cmd/
$*
-
@rm
-rf
build/
${
PROVIDER
}
/staging/
${
PLATFORM
}
&&
mkdir
-p
build/
${
PROVIDER
}
/staging/
${
PLATFORM
}
-
@ln
-s
../../bin/
${
PLATFORM
}
/
$*
build/
${
PROVIDER
}
/staging/
${
PLATFORM
}
/
$*
test
:
@
go
test
-tags
"integration
$(
TAGS
)
"
./...
...
...
@@ -83,12 +73,14 @@ build_win:
powershell
-Command
'$$version=git describe --tags; go build -ldflags "-H windowsgui -X main.version=$$version" ./cmd/*'
CROSS_WIN_FLAGS
=
CGO_ENABLED
=
1
GOARCH
=
386
GOOS
=
windows
CC
=
"/usr/bin/i686-w64-mingw32-gcc"
CGO_LDFLAGS
=
"-lssp"
CXX
=
"i686-w64-mingw32-c++"
PLATFORM_WIN
=
PLATFORM
=
windows
build_cross_win
:
$(
CROSS_WIN_FLAGS
)
$(
MAKE
)
build
$(
CROSS_WIN_FLAGS
)
$(
PLATFORM_WIN
)
$(
MAKE
)
build
CROSS_OSX_FLAGS
=
MACOSX_DEPLOYMENT_TARGET
=
10.10
CGO_ENABLED
=
1
GOOS
=
darwin
CC
=
"o64-clang"
PLATFORM_OSX
=
PLATFORM
=
darwin
build_cross_osx
:
$(
CROSS_OSX_FLAGS
)
$(
MAKE
)
build
$(
CROSS_OSX_FLAGS
)
$(
PLATFORM_OSX
)
$(
MAKE
)
build
build_done
:
@
echo
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment