Commit 258f308 1 parent 8722871 commit 258f308 Copy full SHA for 258f308
File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1
1
CURRET_DIR =$(shell pwd)
2
+ BINARY =./build/sgn
2
3
BUILD=CGO_ENABLED =1 go build
3
4
OUT_DIR =${CURRET_DIR}/build
4
5
BUILD_FLAGS =-trimpath -buildvcs=false -ldflags="-s -w -X github.com/EgeBalci/sgn/config.Version=$$(git log --pretty=format:'v2.0.1.%at-%h' -n 1 ) "
5
6
STATIC_BUILD_FLAGS =-trimpath -buildvcs=false -ldflags="-extldflags=-static -s -w -X github.com/EgeBalci/sgn/config.Version=$$(git log --pretty=format:'v2.0.1.%at-%h' -n 1 ) "
6
7
8
+ # Builds the project
7
9
default :
8
10
${BUILD} ${BUILD_FLAGS} -o ${OUT_DIR} /
11
+ # Builds the project with full static linking
9
12
static :
10
13
${BUILD} ${STATIC_BUILD_FLAGS} -o ${OUT_DIR} /
14
+ # Installs our project: copies binaries
15
+ install :
16
+ go install ${BUILD_FLAGS} github.com/EgeBalci/sgn@latest
11
17
386 :
12
18
GOARCH=386 ${BUILD} ${BUILD_FLAGS} -o ${OUT_DIR} /
13
19
linux_amd64 :
@@ -20,3 +26,9 @@ windows_386:
20
26
GOOS=windows GOARCH=386 CGO_ENABLED=1 CGO_LDFLAGS=" -lkeystone -L${CURRET_DIR} /build/lib32/dll/" CXX=i686-w64-mingw32-g++ CC=i686-w64-mingw32-gcc go build -ldflags=" -s -w" -trimpath -o ${OUT_DIR} /sgn32.exe
21
27
darwin_amd64 :
22
28
GOOS=darwin GOARCH=amd64 ${BUILD} ${BUILD_FLAGS} -o ${OUT_DIR} /
29
+
30
+ # Cleans our project: deletes binaries
31
+ clean :
32
+ rm -rf ./build
33
+
34
+ .PHONY : clean install
You can’t perform that action at this time.
0 commit comments