Markfile
メイクファイルを使用し、ビルドして実行するソフトウェアアプリケーションへの自動化ツールです。
GOプログラム
まず、GOアプリケーションを作成します
package main
import "fmt"
func main() {
fmt.Println("Hello Markfile!!")
}
Markfileを作成します
build:
go build -o bin/main main.go
run:
go run main.go
compile:
# 32-Bit Systems
# FreeBDS
GOOS=freebsd GOARCH=386 go build -o bin/main-freebsd-386 main.go
# MacOS
GOOS=darwin GOARCH=386 go build -o bin/main-darwin-386 main.go
# Linux
GOOS=linux GOARCH=386 go build -o bin/main-linux-386 main.go
# Windows
GOOS=windows GOARCH=386 go build -o bin/main-windows-386 main.go
# 64-Bit
# FreeBDS
GOOS=freebsd GOARCH=amd64 go build -o bin/main-freebsd-amd64 main.go
# MacOS
GOOS=darwin GOARCH=amd64 go build -o bin/main-darwin-amd64 main.go
# Linux
GOOS=linux GOARCH=amd64 go build -o bin/main-linux-amd64 main.go
# Windows
GOOS=windows GOARCH=amd64 go build -o bin/main-windows-amd64 main.go
コマンドを実行しMarkfile
ビルドコマンド
当社のプラットフォーム用のアプリケーションを構築するために行きます
make build
コマンドを実行します
外出先で実行されるアプリケーション
make run
コンパイルコマンド
異なるプラットフォームやオペレーティングシステムのために行くのアプリケーションをコンパイルします
make compile