From f66c2cf7a4d4f5fb4b533a79c2a1f92901a09d98 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 1 Jun 2023 22:20:15 +0100 Subject: Convert PNG images automatically --- src/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Makefile') diff --git a/src/Makefile b/src/Makefile index a53c697..4852b93 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,8 +3,11 @@ CC := i586-pc-msdosdjgpp-gcc CFLAGS := -I. -c -Wall -pedantic -O2 -march=i386 LDFLAGS := -s +IMGS := $(wildcard ../data/*.png) +IMG_OBJS := $(IMGS:../data/%.png=%.o) + SRCS := $(wildcard *.c) -OBJS := $(SRCS:.c=.o) palette.o +OBJS := $(SRCS:.c=.o) $(IMG_OBJS) palette.o all: $(BIN) @@ -17,6 +20,9 @@ $(BIN): $(OBJS) palette.o: ../data/sprites.png ../tools/pngpal.py $< $@ +$(IMG_OBJS): %.o: ../data/%.png + ../tools/pngpix.py $< $@ + clean: rm -f $(BIN) *.o Makefile.deps -- cgit v1.2.3