-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (24 loc) · 1013 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
all: build/irfetch-osx.zip build/irfetch-win386.zip build/irfetch-linux386.zip
.PHONY: clean
clean:
rm build/*
build/irfetch.osx-arm64: *.go examples/irfetch/*.go
cd examples/irfetch && \
GOOS=darwin GOARCH=arm64 go build -o ../../build/irfetch.osx-arm64
build/irfetch.osx-amd64: *.go examples/irfetch/*.go
cd examples/irfetch && \
GOOS=darwin GOARCH=amd64 go build -o ../../build/irfetch.osx-amd64
build/irfetch-osx.zip: build/irfetch.osx-arm64 build/irfetch.osx-amd64
lipo -create -output build/irfetch.osx-universal build/irfetch.osx-arm64 build/irfetch.osx-amd64
cd build && \
zip irfetch-osx.zip irfetch.osx-universal
build/irfetch-win386.zip: *.go examples/irfetch/*.go
cd examples/irfetch && \
GOOS=windows GOARCH=386 go build -o ../../build/irfetch.exe
cd build && \
zip irfetch-win386.zip irfetch.exe
build/irfetch-linux386.zip: *.go examples/irfetch/*.go
cd examples/irfetch && \
GOOS=linux GOARCH=386 go build -o ../../build/irfetch
cd build && \
zip irfetch-linux386.zip irfetch