From a88810c8a70c8e3a7533a266774ab61a84a9adf4 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 2 Jul 2023 21:31:19 +0100 Subject: Add sound support --- src/Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/Makefile') 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 -- cgit v1.2.3