aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-06-26 20:21:40 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-06-26 20:21:40 +0100
commit8cb23f31b6973ba90bf0dc23ffbac73c7ec0bdce (patch)
tree1f86cddee55a70bdd50684790abfddfe90f02cc6
parent39e34a5377533733340fd1117719bcd42ac782ee (diff)
downloadgold-mine-run-8cb23f31b6973ba90bf0dc23ffbac73c7ec0bdce.tar.gz
gold-mine-run-8cb23f31b6973ba90bf0dc23ffbac73c7ec0bdce.zip
Infra work for the audio
-rw-r--r--README.md3
-rw-r--r--TODO.md4
-rw-r--r--src/Makefile8
3 files changed, 10 insertions, 5 deletions
diff --git a/README.md b/README.md
index 5ac2731..7ca35c4 100644
--- a/README.md
+++ b/README.md
@@ -15,11 +15,14 @@ Development:
- GNU Make
- DJGPP C (using GCC 12.1.0; other may work)
+- [libmikmod](https://mikmod.sourceforge.net/)
- DOSBOX
- tools: Python 3 and PIL (or Pillow) library
For DJGPP I recommend cross-compilation using [build-djgpp](https://github.com/andrewwutw/build-djgpp/).
+Set `LIBMIKMOD_BASE` env variable to your libmikmod sourceis with the DOS library compiled and ready to use.
+
You can build the game with `make` and run it in DOSBOX with `make run`.
## Author
diff --git a/TODO.md b/TODO.md
index 792c458..3d5e2f7 100644
--- a/TODO.md
+++ b/TODO.md
@@ -11,9 +11,7 @@
- free
- tracker
- sound
- - SB samples
- - MOD player?
- - ADLIB music?
+ - libmikmod
- screens
- pause
- input
diff --git a/src/Makefile b/src/Makefile
index 4c26b5b..4764364 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,7 +1,11 @@
+ifeq ($(LIBMIKMOD_BASE),)
+$(error Set LIBMIKMOD_BASE variable to libmikmod base directory with the DOS library compiled)
+endif
+
BIN := ../game.exe
CC := i586-pc-msdosdjgpp-gcc
-CFLAGS := -I. -c -Wall -Werror -pedantic -O2 -march=i386 -DDEBUG
-LDFLAGS := -s
+CFLAGS := -I. -I$(LIBMIKMOD_BASE)/include -c -Wall -Werror -pedantic -O2 -march=i386 -DDEBUG
+LDFLAGS := -s -L$(LIBMIKMOD_BASE)/dos -lmikmod
IMGS := $(wildcard ../data/*.png)
IMG_OBJS := $(IMGS:../data/%.png=%.o)