aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-07-02 21:31:19 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-07-02 21:31:19 +0100
commita88810c8a70c8e3a7533a266774ab61a84a9adf4 (patch)
tree9ec78cd5e20f06a6cbcbd0251e215f2ecaae71c4 /src/Makefile
parent6e03fe85b19bc533888a4689572aab0ccf68edc4 (diff)
downloadgold-mine-run-a88810c8a70c8e3a7533a266774ab61a84a9adf4.tar.gz
gold-mine-run-a88810c8a70c8e3a7533a266774ab61a84a9adf4.zip
Add sound support
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 4764364..1631723 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -5,7 +5,8 @@ endif
BIN := ../game.exe
CC := i586-pc-msdosdjgpp-gcc
CFLAGS := -I. -I$(LIBMIKMOD_BASE)/include -c -Wall -Werror -pedantic -O2 -march=i386 -DDEBUG
-LDFLAGS := -s -L$(LIBMIKMOD_BASE)/dos -lmikmod
+LDFLAGS := -s -L$(LIBMIKMOD_BASE)/dos
+LIBS := -lmikmod
IMGS := $(wildcard ../data/*.png)
IMG_OBJS := $(IMGS:../data/%.png=%.o)
@@ -13,13 +14,16 @@ IMG_OBJS := $(IMGS:../data/%.png=%.o)
MAPS := ../data/stage.json
MAP_OBJS := $(MAPS:../data/%.json=%.o)
+WAVS := $(wildcard ../data/*.wav)
+WAV_OBJS := $(WAVS:../data/%.wav=%.o)
+
SRCS := $(wildcard *.c)
-OBJS := $(SRCS:.c=.o) $(IMG_OBJS) palette.o $(MAP_OBJS)
+OBJS := $(SRCS:.c=.o) $(IMG_OBJS) palette.o $(MAP_OBJS) $(WAV_OBJS) music.o
all: $(BIN)
$(BIN): $(OBJS)
- $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
+ $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ $(LIBS)
.c.o:
$(CC) $(CFLAGS) $< -o $@
@@ -33,6 +37,12 @@ $(IMG_OBJS): %.o: ../data/%.png
$(MAP_OBJS): %.o: ../data/%.json
../tools/map.py $< $@
+$(WAV_OBJS): %.o: ../data/%.wav
+ ../tools/raw.py $< $@
+
+music.o: ../data/music.it
+ ../tools/raw.py $< $@
+
clean:
rm -f $(BIN) *.o Makefile.deps