"Fossies" - the Fresh Open Source Software Archive

Member "frp-0.36.2/Makefile.cross-compiles" (22 Mar 2021, 1160 Bytes) of package /linux/misc/frp-0.36.2.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.cross-compiles": 0.36.1_vs_0.36.2.

    1 export PATH := $(GOPATH)/bin:$(PATH)
    2 export GO111MODULE=on
    3 LDFLAGS := -s -w
    4 
    5 os-archs=darwin:amd64 darwin:arm64 freebsd:386 freebsd:amd64 linux:386 linux:amd64 linux:arm linux:arm64 windows:386 windows:amd64 linux:mips64 linux:mips64le linux:mips:softfloat linux:mipsle:softfloat
    6 
    7 all: build
    8 
    9 build: app
   10 
   11 app:
   12 	@$(foreach n, $(os-archs),\
   13 		os=$(shell echo "$(n)" | cut -d : -f 1);\
   14 		arch=$(shell echo "$(n)" | cut -d : -f 2);\
   15 		gomips=$(shell echo "$(n)" | cut -d : -f 3);\
   16 		target_suffix=$${os}_$${arch};\
   17 		echo "Build $${os}-$${arch}...";\
   18 		env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} go build -trimpath -ldflags "$(LDFLAGS)" -o ./release/frpc_$${target_suffix} ./cmd/frpc;\
   19 		env CGO_ENABLED=0 GOOS=$${os} GOARCH=$${arch} GOMIPS=$${gomips} go build -trimpath -ldflags "$(LDFLAGS)" -o ./release/frps_$${target_suffix} ./cmd/frps;\
   20 		echo "Build $${os}-$${arch} done";\
   21 	)
   22 	@mv ./release/frpc_windows_386 ./release/frpc_windows_386.exe
   23 	@mv ./release/frps_windows_386 ./release/frps_windows_386.exe
   24 	@mv ./release/frpc_windows_amd64 ./release/frpc_windows_amd64.exe
   25 	@mv ./release/frps_windows_amd64 ./release/frps_windows_amd64.exe