Add a new target for the RMPro installer to the Makefile and rearrange / rename some of the other variables to reflect multiple outputs.
This commit is contained in:
parent
743a38c344
commit
eb3d963a87
1 changed files with 22 additions and 11 deletions
31
Makefile
31
Makefile
|
@ -1,25 +1,36 @@
|
|||
BINARY=dist/rmfakecloud-proxy
|
||||
WINBINARY=dist/rmfakecloud-proxy.exe
|
||||
LINUXBINARY=dist/rmfakecloud-proxy64
|
||||
INSTALLER=dist/installer.sh
|
||||
ARMV7_BINARY=dist/rmfakecloud-proxy-arm7
|
||||
AARCH64_BINARY=dist/rmfakecloud-proxy-aarch64
|
||||
WIN_BINARY=dist/rmfakecloud-proxy.exe
|
||||
LINUX_BINARY=dist/rmfakecloud-proxy64
|
||||
RM12_INSTALLER=dist/installer-rm12.sh
|
||||
RMPRO_INSTALLER=dist/installer-rmpro.sh
|
||||
.PHONY: clean
|
||||
all: $(INSTALLER) $(WINBINARY) $(LINUXBINARY)
|
||||
all: $(RMPRO_INSTALLER) $(RM12_INSTALLER) $(WIN_BINARY) $(LINUX_BINARY)
|
||||
|
||||
$(LINUXBINARY): version.go main.go
|
||||
$(LINUX_BINARY): version.go main.go
|
||||
go build -ldflags="-w -s" -o $@
|
||||
|
||||
$(BINARY): version.go main.go
|
||||
$(ARMV7_BINARY): version.go main.go
|
||||
GOARCH=arm GOARM=7 go build -ldflags="-w -s" -o $@
|
||||
|
||||
$(WINBINARY): version.go main.go
|
||||
$(AARCH64_BINARY): version.go main.go
|
||||
GOARCH=arm64 go build -ldflags="-w -s" -o $@
|
||||
|
||||
$(WIN_BINARY): version.go main.go
|
||||
GOOS=windows go build -ldflags="-w -s" -o $@
|
||||
|
||||
version.go:
|
||||
go generate
|
||||
|
||||
$(INSTALLER): $(BINARY) scripts/installer.sh
|
||||
$(RMPRO_INSTALLER): $(AARCH64_BINARY) scripts/installer.sh
|
||||
cp scripts/installer.sh $@
|
||||
gzip -c $(BINARY) >> $@
|
||||
gzip -c $(AARCH64_BINARY) >> $@
|
||||
chmod +x $@
|
||||
|
||||
$(RM12_INSTALLER): $(ARMV7_BINARY) scripts/installer.sh
|
||||
cp scripts/installer.sh $@
|
||||
gzip -c $(ARMV7_BINARY) >> $@
|
||||
chmod +x $@
|
||||
|
||||
clean:
|
||||
rm -fr dist
|
||||
|
|
Loading…
Add table
Reference in a new issue