aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2023-05-29 23:32:41 +0100
committerJuan J. Martinez <jjm@usebox.net>2023-05-29 23:32:41 +0100
commit2941ac6b8ecc1fd96b886219795f5d7e55bb85d8 (patch)
tree9786ef28b990199e353bea285d6d5ecdb0a45e31 /src/Makefile
downloadgold-mine-run-2941ac6b8ecc1fd96b886219795f5d7e55bb85d8.tar.gz
gold-mine-run-2941ac6b8ecc1fd96b886219795f5d7e55bb85d8.zip
Initial import
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..94b83eb
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,25 @@
+BIN := ../game.exe
+CC := i586-pc-msdosdjgpp-gcc
+CFLAGS := -I. -c -Wall -pedantic -O2 -march=i386
+LDFLAGS := -s
+
+SRCS := $(wildcard *.c)
+OBJS := $(SRCS:.c=.o)
+
+all: $(BIN)
+
+$(BIN): $(OBJS)
+ $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
+
+.c.o:
+ $(CC) $(CFLAGS) $< -o $@
+
+clean:
+ rm -f $(BIN) *.o Makefile.deps
+
+Makefile.deps: $(SRCS)
+ $(CC) $(CFLAGS) -MM *.[ch] > Makefile.deps
+
+.PHONY: all clean
+
+include Makefile.deps