Skip to content

Instantly share code, notes, and snippets.

@atirut-w
Last active September 15, 2021 04:33
Show Gist options
  • Save atirut-w/5f6d4e13a23ae0a491f2c0bdce029841 to your computer and use it in GitHub Desktop.
Save atirut-w/5f6d4e13a23ae0a491f2c0bdce029841 to your computer and use it in GitHub Desktop.
GNOME Builder Makefile for LOVE2D games
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