aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2021-01-03 20:59:22 +0000
committerJuan J. Martinez <jjm@usebox.net>2021-01-03 21:00:45 +0000
commita64b5690098285dffd3c50e7761ea7d3b0755cac (patch)
treeba5d5156dc54735d8bb60336e4a3a9b6ef701932
parent02da785ec1457f1907f1d7af154460fcd11aa9cb (diff)
downloadubox-msx-lib-a64b5690098285dffd3c50e7761ea7d3b0755cac.tar.gz
ubox-msx-lib-a64b5690098285dffd3c50e7761ea7d3b0755cac.zip
More elegant dir management
-rw-r--r--Makefile16
-rw-r--r--game/Makefile12
2 files changed, 19 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index b8171ea..cb44302 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,10 @@
all: libs
-libs: ubox spman mplayer
+libs: lib ubox spman mplayer
-game: libs bin/game.rom
+game: bin libs bin/game.rom
bin/game.rom:
- mkdir -p ./bin
make -C tools
make -C game
@@ -13,15 +12,12 @@ docs:
make -C docs
ubox:
- mkdir -p lib
make -C src/ubox
spman:
- mkdir -p lib
make -C src/spman
mplayer:
- mkdir -p lib
make -C src/mplayer
.PHONY: clean cleanall docs ubox libs bin/game.rom
@@ -32,7 +28,13 @@ clean:
make -C src/mplayer clean
make -C game clean
+lib:
+ mkdir -p ./lib
+
+bin:
+ mkdir -p ./bin
+
cleanall: clean
- rm -rf ./bin
+ rm -rf ./bin ./lib
make -C docs clean
diff --git a/game/Makefile b/game/Makefile
index a98f7cb..df14313 100644
--- a/game/Makefile
+++ b/game/Makefile
@@ -1,9 +1,17 @@
-all:
- mkdir -p ./generated ./bin ./build
+all: generated bin build
make -C data
cd src && ../../tools/mkdeps.py -b ../build -I ../generated:../../include ./ Makefile.deps
make -C src
+generated:
+ mkdir -p ./generated
+
+bin:
+ mkdir -p ./bin
+
+build:
+ mkdir -p ./build
+
.PHONY: all clean
clean:
rm -rf ./generated ./bin ./build