aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-06-01 22:20:15 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-06-01 22:20:15 +0100
commitf66c2cf7a4d4f5fb4b533a79c2a1f92901a09d98 (patch)
treefd015daffb76ef30d11c527261fcbf024d907cd4 /src
parentfdb53d106ef573cd63ea39a4f1f6b5116370e4c8 (diff)
downloadgold-mine-run-f66c2cf7a4d4f5fb4b533a79c2a1f92901a09d98.tar.gz
gold-mine-run-f66c2cf7a4d4f5fb4b533a79c2a1f92901a09d98.zip
Convert PNG images automatically
Diffstat (limited to 'src')
-rw-r--r--src/Makefile8
1 files changed, 7 insertions, 1 deletions
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