From 9fad2dff21a937e60cc68ada4ba651abaecb6715 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Wed, 23 May 2018 09:50:19 +0200 Subject: [PATCH] Add top-level Makefile for sysmodules --- sysmodules/Makefile | 17 +++++++++++++++++ sysmodules/loader/Makefile | 2 +- sysmodules/pxi/Makefile | 2 +- sysmodules/rosalina/Makefile | 2 +- sysmodules/sm/Makefile | 2 +- 5 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 sysmodules/Makefile diff --git a/sysmodules/Makefile b/sysmodules/Makefile new file mode 100644 index 0000000..463c49e --- /dev/null +++ b/sysmodules/Makefile @@ -0,0 +1,17 @@ +SUBFOLDERS := loader sm pxi rosalina +CXIS := $(foreach dir, $(SUBFOLDERS), $(dir)/$(dir).cxi) + +.PHONY: all clean $(SUBFOLDERS) + +all: sysmodules.bin + +clean: + @$(foreach dir, $(SUBFOLDERS), make -C $(dir) clean &&) true + @rm -rf sysmodules.bin + +sysmodules.bin: $(SUBFOLDERS) + @cat $(CXIS) > $@ + @echo built... $(notdir $@) + +$(SUBFOLDERS): + @$(MAKE) -C $@ all diff --git a/sysmodules/loader/Makefile b/sysmodules/loader/Makefile index 7563f8e..9931bc5 100755 --- a/sysmodules/loader/Makefile +++ b/sysmodules/loader/Makefile @@ -105,7 +105,7 @@ $(BUILD): #--------------------------------------------------------------------------------- clean: @echo clean ... - @rm -fr $(BUILD) $(TARGET).bin $(TARGET).elf + @rm -fr $(BUILD) $(TARGET).cxi $(TARGET).elf #--------------------------------------------------------------------------------- diff --git a/sysmodules/pxi/Makefile b/sysmodules/pxi/Makefile index 748c7f1..344c151 100644 --- a/sysmodules/pxi/Makefile +++ b/sysmodules/pxi/Makefile @@ -105,7 +105,7 @@ $(BUILD): #--------------------------------------------------------------------------------- clean: @echo clean ... - @rm -fr $(BUILD) $(TARGET).bin $(TARGET).elf + @rm -fr $(BUILD) $(TARGET).cxi $(TARGET).elf #--------------------------------------------------------------------------------- diff --git a/sysmodules/rosalina/Makefile b/sysmodules/rosalina/Makefile index a65554c..71f5488 100644 --- a/sysmodules/rosalina/Makefile +++ b/sysmodules/rosalina/Makefile @@ -105,7 +105,7 @@ $(BUILD): #--------------------------------------------------------------------------------- clean: @echo clean ... - @rm -fr $(BUILD) $(TARGET).bin $(TARGET).elf + @rm -fr $(BUILD) $(TARGET).cxi $(TARGET).elf #--------------------------------------------------------------------------------- diff --git a/sysmodules/sm/Makefile b/sysmodules/sm/Makefile index 748c7f1..344c151 100644 --- a/sysmodules/sm/Makefile +++ b/sysmodules/sm/Makefile @@ -105,7 +105,7 @@ $(BUILD): #--------------------------------------------------------------------------------- clean: @echo clean ... - @rm -fr $(BUILD) $(TARGET).bin $(TARGET).elf + @rm -fr $(BUILD) $(TARGET).cxi $(TARGET).elf #---------------------------------------------------------------------------------