forked from jaildesigner-jailgames/jaildoctors_dilemma
actualitzada la carpeta release a SDL3
migrat a resources.pack
This commit is contained in:
53
tools/pack_resources/Makefile
Normal file
53
tools/pack_resources/Makefile
Normal file
@@ -0,0 +1,53 @@
|
||||
# Makefile for pack_resources tool
|
||||
|
||||
# Compiler
|
||||
CXX := g++
|
||||
CXXFLAGS := -std=c++20 -Wall -Wextra -O2
|
||||
|
||||
# Directories
|
||||
TOOL_DIR := .
|
||||
SOURCE_DIR := ../../source/core/resources
|
||||
|
||||
# Source files
|
||||
SOURCES := pack_resources.cpp \
|
||||
$(SOURCE_DIR)/resource_pack.cpp
|
||||
|
||||
# Output
|
||||
TARGET := pack_resources
|
||||
|
||||
# Platform-specific executable extension
|
||||
ifeq ($(OS),Windows_NT)
|
||||
TARGET := $(TARGET).exe
|
||||
endif
|
||||
|
||||
# Default target
|
||||
all: $(TARGET)
|
||||
|
||||
# Build the tool
|
||||
$(TARGET): $(SOURCES)
|
||||
@echo "Building pack_resources tool..."
|
||||
$(CXX) $(CXXFLAGS) $(SOURCES) -o $(TARGET)
|
||||
@echo "Build complete: $(TARGET)"
|
||||
|
||||
# Test: create a test pack
|
||||
test: $(TARGET)
|
||||
@echo "Creating test pack..."
|
||||
./$(TARGET) ../../data test_resources.pack
|
||||
|
||||
# Create the actual resources.pack
|
||||
pack: $(TARGET)
|
||||
@echo "Creating resources.pack..."
|
||||
./$(TARGET) ../../data ../../resources.pack
|
||||
|
||||
# List contents of a pack
|
||||
list: $(TARGET)
|
||||
@echo "Listing pack contents..."
|
||||
./$(TARGET) --list ../../resources.pack
|
||||
|
||||
# Clean
|
||||
clean:
|
||||
@echo "Cleaning..."
|
||||
rm -f $(TARGET) test_resources.pack
|
||||
@echo "Clean complete"
|
||||
|
||||
.PHONY: all test pack list clean
|
||||
Reference in New Issue
Block a user