principia/utils/lvl-icon-extractor/Makefile
ROllerozxa 0051979187 Add lvl-icon-extractor tool for extracting icon from level files
Rewritten from the original `level-screenshot-converter` Python script into C++ using Principia's own level reader and libpng directly
2026-05-31 00:17:18 +02:00

20 lines
461 B
Makefile

BIN = ../bin
PRINCIPIA = ../..
PROGRAM = lvl-icon-extractor
SRCS := main.cc $(PRINCIPIA)/src/pkgman.cc $(PRINCIPIA)/src/rand.c
CXX ?= g++
CXXFLAGS ?= -D_NO_TMS -O2 -ffunction-sections -fdata-sections
INCLUDES ?= -I$(PRINCIPIA)/src -I$(PRINCIPIA)/lib
LDFLAGS ?= -lz -lpng -Wl,--gc-sections
all: $(BIN)/$(PROGRAM)
$(BIN)/$(PROGRAM): $(SRCS)
@mkdir -p $(BIN)
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $^ $(LDFLAGS)
clean:
rm $(BIN)/$(PROGRAM)
.PHONY: all clean