From a64b5690098285dffd3c50e7761ea7d3b0755cac Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sun, 3 Jan 2021 20:59:22 +0000 Subject: More elegant dir management --- Makefile | 16 +++++++++------- game/Makefile | 12 ++++++++++-- 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 -- cgit v1.2.3