2D_Engine_C/Makefile

54 lines
772 B
Makefile

SHELL = /bin/bash
# Build folder
BUILD_DIR = build
# Core output target name
CORE_OUTPUT := libCore.so
# Source output target name
SOURCE_OUTPUT := 2D_Engine
# Assets output
ASSETS_OUTPUT := game.data
# Verbosity
Q := @
ifeq ($(VERBOSE), 1)
Q :=
endif
# Colors
GREEN := \033[32m
YELLOW := \033[33m
RESET := \033[m
# Default targets
#all: build_core build_src compress_assets end
all: build_core build_src
# Sub Makefiles
SOURCE_DIR = src
CORE_DIR = core
ASSETS_DIR = assets
include $(CORE_DIR)/Makefile
include $(SOURCE_DIR)/Makefile
include $(ASSETS_DIR)/Makefile
# Print ending message
end:
@echo "Built target $(OUTPUT)"
# Clean
.PHONY: clean
clean:
$(Q)rm -rf $(BUILD_DIR)
@echo "Build dir cleaned"
# Run executable
.PHONY: run
run:
$(Q)./$(OUTPUT)