Skip to content

Commit 57b8907

Browse files
author
gatari
committed
bins
1 parent 59499b1 commit 57b8907

File tree

5 files changed

+19
-25
lines changed

5 files changed

+19
-25
lines changed

bin/nix/ldrgen_x64

5.92 MB
Binary file not shown.

bin/nix/ldrgen_x86

5.58 MB
Binary file not shown.

bin/win/ldrgen_win32.exe

5.95 MB
Binary file not shown.

bin/win/ldrgen_win64.exe

6.28 MB
Binary file not shown.

makefile

+19-25
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,38 @@ BINARY_NAME := ldrgen
22
SRC_FOLDER := src
33
BIN_FOLDER := bin
44

5-
GO_BUILD_CMD := GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o
6-
75
.PHONY: all windows linux clean win64 win32 x64 x86
86

97
all:
10-
@echo "[*] No default target specified, available targets: 'win64', 'win32', 'x64', 'x86'."
11-
@echo "[*] Alternatively, you can run 'make windows' or 'make linux' to compile for both platforms."
8+
@echo "[*] Specify a target: windows, linux"
9+
10+
build: windows linux
1211

13-
windows: GOOS=windows
1412
windows: win64 win32
15-
@echo "[*] Done compiling for Windows x64 and x86, binaries are located at: $(BIN_FOLDER)"
1613

17-
linux: GOOS=linux
1814
linux: x64 x86
19-
@echo "[*] Done compiling for Linux x64 and x86, binaries are located at: $(BIN_FOLDER)"
15+
@echo "[*] Done compiling for Linux x64 and x86, binaries are located in: $(BIN_FOLDER)"
2016

21-
win64: GOARCH=amd64
22-
win64: binary
23-
@echo "[*] Done compiling for Windows x64, binary is located at: $(BIN_FOLDER)"
17+
win64:
18+
@echo "[*] Compiling for Windows x64"
19+
@GOOS=windows GOARCH=amd64 go build -o $(BIN_FOLDER)/win/$(BINARY_NAME)_win64.exe $(SRC_FOLDER)/main.go
20+
@echo "[*] Done compiling for Windows x64, binary is located in: $(BIN_FOLDER)"
2421

25-
win32: GOARCH=386
26-
win32: binary
27-
@echo "[*] Done compiling for Windows x86, binary is located at: $(BIN_FOLDER)"
22+
win32:
23+
@echo "[*] Compiling for Windows x86"
24+
@GOOS=windows GOARCH=386 go build -o $(BIN_FOLDER)/win/$(BINARY_NAME)_win32.exe $(SRC_FOLDER)/main.go
25+
@echo "[*] Done compiling for Windows x86, binary is located in: $(BIN_FOLDER)"
2826

29-
x64: GOARCH=amd64
30-
x64: binary
31-
@echo "[*] Done compiling for Linux x64, binary is located at: $(BIN_FOLDER)"
27+
x64:
28+
@echo "[*] Compiling for Linux x64"
29+
@GOOS=linux GOARCH=amd64 go build -o $(BIN_FOLDER)/nix/$(BINARY_NAME)_x64 $(SRC_FOLDER)/main.go
3230

33-
x86: GOARCH=386
34-
x86: binary
35-
@echo "[*] Done compiling for Linux x86, binary is located at: $(BIN_FOLDER)"
31+
x86:
32+
@echo "[*] Compiling for Linux x86"
33+
@GOOS=linux GOARCH=386 go build -o $(BIN_FOLDER)/nix/$(BINARY_NAME)_x86 $(SRC_FOLDER)/main.go
3634

37-
binary:
38-
@echo "[*] Compiling for $(GOOS) $(GOARCH)"
39-
@mkdir -p $(BIN_FOLDER)
40-
@$(GO_BUILD_CMD) $(BIN_FOLDER)/$(BINARY_NAME)_$(GOOS)_$(GOARCH) $(SRC_FOLDER)/main.go
4135

4236
clean:
4337
@echo "[*] Cleaning up"
44-
@rm -rf $(BIN_FOLDER)
38+
@rm -rf $(BIN_FOLDER)/*
4539
@echo "[*] Done cleaning up"

0 commit comments

Comments
 (0)