Last active
September 15, 2021 04:33
-
-
Save atirut-w/5f6d4e13a23ae0a491f2c0bdce029841 to your computer and use it in GitHub Desktop.
GNOME Builder Makefile for LOVE2D games
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT_NAME = love2d_game | |
SOURCE_DIR = src | |
BUILD_DIR = build | |
LOVE_PATH = $(shell which love) | |
build: $(SOURCE_DIR) | |
@mkdir -p $(BUILD_DIR) | |
@cd $(SOURCE_DIR) && zip -9 -FSr ../$(BUILD_DIR)/game_data.zip . > /dev/null | |
@cd $(BUILD_DIR) && cat $(LOVE_PATH) game_data.zip > $(PROJECT_NAME) && chmod a+x $(PROJECT_NAME) | |
@rm $(BUILD_DIR)/game_data.zip | |
@echo Finished building $(PROJECT_NAME) | |
clean: | |
@rm -rf $(BUILD_DIR) | |
install: | |
run: | |
@./build/$(PROJECT_NAME) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment