Add targets to build and install library and ARM7 cores

This commit is contained in:
Antonio Niño Díaz 2024-12-01 18:52:46 +00:00
parent 8869ab6d82
commit c6df41542f
5 changed files with 64 additions and 12 deletions

View File

@ -30,7 +30,7 @@ endif
# Targets
# -------
.PHONY: all arm7 arm9 clean install
.PHONY: all arm7 arm9 clean install install-lib sys
all: arm9 arm7
@ -43,9 +43,18 @@ arm7:
clean:
@echo " CLEAN"
@$(RM) $(VERSION_HEADER) lib build
@+$(MAKE) -C sys clean
install: all
@echo " INSTALL $(BLOCKSDSEXT)/$(INSTALLNAME)/"
install-lib: arm9 arm7
@echo " INSTALL LIB $(BLOCKSDSEXT)/$(INSTALLNAME)/"
$(V)$(RM) $(BLOCKSDSEXT)/$(INSTALLNAME)/
$(V)$(INSTALL) -d $(BLOCKSDSEXT)/$(INSTALLNAME)/
$(V)$(CP) -r include lib $(BLOCKSDSEXT)/$(INSTALLNAME)/
sys: install-lib
@+$(MAKE) -C sys
install: sys
@echo " INSTALL SYS $(BLOCKSDSEXT)/$(INSTALLNAME)/"
$(V)$(INSTALL) -d $(BLOCKSDSEXT)/$(INSTALLNAME)/
+$(MAKE) -C sys install INSTALLDIR=$(BLOCKSDSEXT)/$(INSTALLNAME)/sys

46
sys/Makefile Normal file
View File

@ -0,0 +1,46 @@
# SPDX-License-Identifier: CC0-1.0
#
# SPDX-FileContributor: Antonio Niño Díaz, 2024
BLOCKSDS ?= /opt/blocksds/core
BLOCKSDSEXT ?= /opt/blocksds/external
# Tools
# -----
CP := cp
INSTALL := install
RM := rm -rf
MAKE := make
# Targets
# -------
.PHONY: all arm7_maxmod_dswifi arm7_mp3 arm7_mp3_dswifi clean install
all: arm7_maxmod_dswifi arm7_mp3 arm7_mp3_dswifi
arm7_maxmod_dswifi:
$(MAKE) -C arm7_maxmod_dswifi
arm7_mp3:
$(MAKE) -C arm7_mp3
arm7_mp3_dswifi:
$(MAKE) -C arm7_mp3_dswifi
INSTALLDIR ?= $(BLOCKSDSEXT)/palib/sys
INSTALLDIR_ABS := $(abspath $(INSTALLDIR))
install: all
@echo " INSTALL $(INSTALLDIR_ABS)"
@test $(INSTALLDIR_ABS)
@$(INSTALL) -d $(INSTALLDIR_ABS)
$(MAKE) -C arm7_maxmod_dswifi install INSTALLDIR=$(INSTALLDIR_ABS)
$(MAKE) -C arm7_mp3 install INSTALLDIR=$(INSTALLDIR_ABS)
$(MAKE) -C arm7_mp3_dswifi install INSTALLDIR=$(INSTALLDIR_ABS)
clean:
$(MAKE) -C arm7_maxmod_dswifi clean
$(MAKE) -C arm7_mp3 clean
$(MAKE) -C arm7_mp3_dswifi clean

View File

@ -133,15 +133,14 @@ clean:
@echo " CLEAN"
$(V)$(RM) $(ELF) $(DUMP) $(MAP) $(BUILDDIR)
INSTALLDIR ?= /opt/blocksds/core/sys/default_arm7
INSTALLDIR ?= $(BLOCKSDSEXT)/palib/sys/
INSTALLDIR_ABS := $(abspath $(INSTALLDIR))
install: all
@echo " INSTALL $(INSTALLDIR_ABS)"
@test $(INSTALLDIR_ABS)
$(V)$(RM) $(INSTALLDIR_ABS)
$(V)$(INSTALL) -d $(INSTALLDIR_ABS)
$(V)$(CP) -r arm7.elf COPYING $(INSTALLDIR_ABS)
$(V)$(CP) -r $(ELF) $(INSTALLDIR_ABS)
# Rules
# -----

View File

@ -133,15 +133,14 @@ clean:
@echo " CLEAN"
$(V)$(RM) $(ELF) $(DUMP) $(MAP) $(BUILDDIR)
INSTALLDIR ?= /opt/blocksds/core/sys/default_arm7
INSTALLDIR ?= $(BLOCKSDSEXT)/palib/sys/
INSTALLDIR_ABS := $(abspath $(INSTALLDIR))
install: all
@echo " INSTALL $(INSTALLDIR_ABS)"
@test $(INSTALLDIR_ABS)
$(V)$(RM) $(INSTALLDIR_ABS)
$(V)$(INSTALL) -d $(INSTALLDIR_ABS)
$(V)$(CP) -r arm7.elf COPYING $(INSTALLDIR_ABS)
$(V)$(CP) -r $(ELF) $(INSTALLDIR_ABS)
# Rules
# -----

View File

@ -133,15 +133,14 @@ clean:
@echo " CLEAN"
$(V)$(RM) $(ELF) $(DUMP) $(MAP) $(BUILDDIR)
INSTALLDIR ?= /opt/blocksds/core/sys/default_arm7
INSTALLDIR ?= $(BLOCKSDSEXT)/palib/sys/
INSTALLDIR_ABS := $(abspath $(INSTALLDIR))
install: all
@echo " INSTALL $(INSTALLDIR_ABS)"
@test $(INSTALLDIR_ABS)
$(V)$(RM) $(INSTALLDIR_ABS)
$(V)$(INSTALL) -d $(INSTALLDIR_ABS)
$(V)$(CP) -r arm7.elf COPYING $(INSTALLDIR_ABS)
$(V)$(CP) -r $(ELF) $(INSTALLDIR_ABS)
# Rules
# -----