-
Notifications
You must be signed in to change notification settings - Fork 0
Makefile
Hector V edited this page Apr 5, 2023
·
2 revisions
PLATFORMS := windows/amd64 linux/amd64 darwin/amd64
OUTPUT_FILE := dir_tree.zip
TEMP_DIR := .bin
build: $(PLATFORMS)
zip -j $(OUTPUT_FILE) $(TEMP_DIR)/*
$(PLATFORMS):
$(eval GOOS=$(word 1,$(subst /, ,$@)))
$(eval GOARCH=$(word 2,$(subst /, ,$@)))
GOOS=$(GOOS) GOARCH=$(GOARCH) go build -o $(TEMP_DIR)/dir_tree-$(GOOS)-$(GOARCH)
$(TEMP_DIR):
mkdir -p $(TEMP_DIR)
clean:
rm -rf $(TEMP_DIR) $(OUTPUT_FILE)
.PHONY: build $(PLATFORMS) clean
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a pull request or open an issue.
- Hat tip to anyone whose code was used
- Inspiration
- etc