mirror of
https://github.com/pret/pokediamond.git
synced 2026-08-06 10:43:24 -05:00
libc to MSL_C
This commit is contained in:
parent
9811df246a
commit
e4c1bde3e7
6
Makefile
6
Makefile
|
|
@ -104,7 +104,7 @@ OBJCOPY := $(CROSS)objcopy
|
|||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/libc/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -ipa file -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/MSL_C/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -map -nodead -w off -proc v5te -interworking -map -symtab -m _start -msgstyle gcc
|
||||
|
||||
####################### Other Tools #########################
|
||||
|
|
@ -132,7 +132,7 @@ TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE))
|
|||
TOOLS: tools
|
||||
|
||||
export LM_LICENSE_FILE := $(TOOLS_DIR)/mwccarm/license.dat
|
||||
export MWCIncludes := arm9/lib/libc/include arm9/lib/NitroSDK/include arm9/lib/libnns/include
|
||||
export MWCIncludes := arm9/lib/MSL_C/include arm9/lib/NitroSDK/include arm9/lib/libnns/include
|
||||
export MWLibraries := arm9/lib
|
||||
|
||||
######################### Targets ###########################
|
||||
|
|
@ -199,7 +199,7 @@ patch_mwasmarm: tools/mwasmarm_patcher
|
|||
ALL_DIRS := $(BUILD_DIR)
|
||||
|
||||
ifeq (,$(NODEP))
|
||||
$(BUILD_DIR)/%.o: dep = $(shell $(SCANINC) -I include -I include-mw -I arm9/lib/libc/include -I arm9/lib/libnns/include -I arm9/lib/NitroSDK/include $(filter $*.c,$(C_FILES)) $(filter $*.cpp,$(CXX_FILES)) $(filter $*.s,$(S_FILES)))
|
||||
$(BUILD_DIR)/%.o: dep = $(shell $(SCANINC) -I include -I include-mw -I arm9/lib/MSL_C/include -I arm9/lib/libnns/include -I arm9/lib/NitroSDK/include $(filter $*.c,$(C_FILES)) $(filter $*.cpp,$(CXX_FILES)) $(filter $*.s,$(S_FILES)))
|
||||
else
|
||||
$(BUILD_DIR)/%.o: dep :=
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ file(GLOB_RECURSE SOURCES "*.c" "*.cpp" "*.s")
|
|||
file(GLOB OVERLAY_INC overlays/*/include)
|
||||
|
||||
add_executable(DP_Arm9 ${SOURCES})
|
||||
target_include_directories(DP_Arm9 PRIVATE ../include ../include-mw lib/NitroSDK/include lib/libc/include lib/libnns/include ${OVERLAY_INC} ../files)
|
||||
target_include_directories(DP_Arm9 PRIVATE ../include ../include-mw lib/NitroSDK/include lib/MSL_C/include lib/libnns/include ${OVERLAY_INC} ../files)
|
||||
target_compile_definitions(DP_Arm9 PUBLIC __CLION_IDE__)
|
||||
|
|
|
|||
|
|
@ -57,10 +57,10 @@ LD_TEMPLATE := ARM9-TS.lcf.template
|
|||
# Directories containing source files
|
||||
|
||||
# sorting wildcards required for versions of make >= 3.8.2 and < 4.3 for consistent builds
|
||||
SRC_DIRS := src lib lib/libnns/src lib/NitroSDK/src lib/libc/src $(sort $(wildcard overlays/*/src))
|
||||
SRC_DIRS := src lib lib/libnns/src lib/NitroSDK/src lib/MSL_C/src $(sort $(wildcard overlays/*/src))
|
||||
ASM_DIRS := asm data files $(sort $(wildcard overlays/*/asm))
|
||||
LIBASM_DIRS := lib/syscall
|
||||
INCLUDE_RECURSIVE_DIRS := ../include-mw lib/libc/include lib/libnns/include lib/NitroSDK/include
|
||||
INCLUDE_RECURSIVE_DIRS := ../include-mw lib/MSL_C/include lib/libnns/include lib/NitroSDK/include
|
||||
INCLUDE_DIRS := ../include $(sort $(wildcard overlays/*/include)) ../files
|
||||
|
||||
C_FILES := $(foreach dir,$(SRC_DIRS),$(sort $(wildcard $(dir)/*.c)))
|
||||
|
|
@ -149,7 +149,7 @@ TOOLS = $(foreach tool,$(TOOLBASE),$(TOOLS_DIR)/$(tool)/$(tool)$(EXE))
|
|||
TOOLS: tools
|
||||
|
||||
export LM_LICENSE_FILE := $(TOOLS_DIR)/mwccarm/license.dat
|
||||
export MWCIncludes := $(CURDIR)/lib/libc/include $(CURDIR)/lib/NitroSDK/include $(CURDIR)/lib/libnns/include
|
||||
export MWCIncludes := $(CURDIR)/lib/MSL_C/include $(CURDIR)/lib/NitroSDK/include $(CURDIR)/lib/libnns/include
|
||||
export MWLibraries := $(CURDIR)/lib
|
||||
|
||||
######################### Targets ###########################
|
||||
|
|
@ -204,16 +204,16 @@ ALL_DIRS := $(BUILD_DIR) $(addprefix $(BUILD_DIR)/,$(SRC_DIRS) $(ASM_DIRS) $(LIB
|
|||
|
||||
# TODO: Move out to lib/Makefile
|
||||
$(BUILD_DIR)/lib/%.o: MWCCVERSION = 1.2/sp2p3
|
||||
$(BUILD_DIR)/lib/%.o: MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/libc/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
$(BUILD_DIR)/lib/%.o: MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
|
||||
$(BUILD_DIR)/lib/libnns/%.o: MWCCVERSION = 1.2/sp3
|
||||
$(BUILD_DIR)/lib/libc/%.o: MWCCVERSION = 2.0/sp1
|
||||
$(BUILD_DIR)/lib/libc/%.o: MWCFLAGS += -ipa file
|
||||
$(BUILD_DIR)/lib/MSL_C/%.o: MWCCVERSION = 2.0/sp1
|
||||
$(BUILD_DIR)/lib/MSL_C/%.o: MWCFLAGS += -ipa file
|
||||
|
||||
####################### Everything Else ######################
|
||||
|
||||
ifeq (,$(NODEP))
|
||||
$(BUILD_DIR)/%.o: dep = $(shell $(SCANINC) -I ../include -I ../include-mw -I lib/libc/include -I lib/libnns/include -I lib/NitroSDK/include $(filter $*.c,$(C_FILES)) $(filter $*.cpp,$(CXX_FILES)) $(filter $*.s,$(S_FILES)) $(filter $*.s,$(LIBS_FILES)))
|
||||
$(BUILD_DIR)/%.o: dep = $(shell $(SCANINC) -I ../include -I ../include-mw -I lib/MSL_C/include -I lib/libnns/include -I lib/NitroSDK/include $(filter $*.c,$(C_FILES)) $(filter $*.cpp,$(CXX_FILES)) $(filter $*.s,$(S_FILES)) $(filter $*.s,$(LIBS_FILES)))
|
||||
else
|
||||
$(BUILD_DIR)/%.o: dep :=
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ OBJCOPY := $(CROSS)objcopy
|
|||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../../..
|
||||
MWCFLAGS = O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/libc/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error -ipa file
|
||||
MWCFLAGS = O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error -ipa file
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic
|
||||
ARFLAGS = rcS
|
||||
|
||||
|
|
@ -54,11 +54,11 @@ OBJCOPY := $(CROSS)objcopy
|
|||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../..
|
||||
MWCFLAGS = -O4,p -char signed -inline on,noauto -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/libc/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -char signed -inline on,noauto -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i include -ir include-mw -ir arm9/lib/MSL_C/include -ir arm9/lib/libnns/include -ir arm9/lib/NitroSDK/include -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic -msgstyle gcc
|
||||
ARFLAGS = rcS
|
||||
|
||||
export MWCIncludes := libc/include libnns/include NitroSDK/include
|
||||
export MWCIncludes := MSL_C/include libnns/include NitroSDK/include
|
||||
|
||||
################ Targets #################
|
||||
|
||||
|
|
@ -69,12 +69,12 @@ all: libs $(LIBS)
|
|||
@:
|
||||
|
||||
libs:
|
||||
$(MAKE) -C libc
|
||||
$(MAKE) -C MSL_C
|
||||
$(MAKE) -C libnns
|
||||
$(MAKE) -C NitroSDK
|
||||
|
||||
clean:
|
||||
$(MAKE) clean -C libc
|
||||
$(MAKE) clean -C MSL_C
|
||||
$(MAKE) clean -C libnns
|
||||
$(MAKE) clean -C NitroSDK
|
||||
$(RM) $(LIBS)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ OBJCOPY := $(CROSS)objcopy
|
|||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../../..
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/libc/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic -msgstyle gcc
|
||||
ARFLAGS = rcS
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ OBJCOPY := $(CROSS)objcopy
|
|||
|
||||
# ./tools/mwccarm/2.0/base/mwasmarm.exe -proc arm5te asm/arm9_thumb.s -o arm9.o
|
||||
MWASFLAGS = -proc arm5te -ir ../../..
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/libc/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWCFLAGS = -O4,p -gccext,on -proc arm946e -msgstyle gcc -gccinc -fp soft -lang c99 -Cpp_exceptions off -i ../include -ir ../include-mw -ir lib/MSL_C/include -ir lib/libnns/include -ir lib/NitroSDK/include -interworking -DFS_IMPLEMENT -enum int -D$(GAME_VERSION) -D$(GAME_LANGUAGE) -W all -W pedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error
|
||||
MWLDFLAGS = -library -nodead -w off -proc v5te -interworking -pic -msgstyle gcc
|
||||
ARFLAGS = rcS
|
||||
|
||||
|
|
|
|||
2
m2ctx.sh
2
m2ctx.sh
|
|
@ -4,7 +4,7 @@ OUT_FILE=ctx.c
|
|||
|
||||
GCC=gcc
|
||||
FLAGS="-E -P -dD -undef"
|
||||
INCLUDES="-Iinclude -Iinclude/constants -Iinclude/nitro -Iinclude-mw -Ifiles -Iarm9/lib/NitroSDK/include -Iarm9/lib/libc/include -Iarm9/lib/libnns/include -Iarm9/overlays/21/include -Iarm9/overlays/52/include -Iarm9/overlays/59/include -include global.h"
|
||||
INCLUDES="-Iinclude -Iinclude/constants -Iinclude/nitro -Iinclude-mw -Ifiles -Iarm9/lib/NitroSDK/include -Iarm9/lib/MSL_C/include -Iarm9/lib/libnns/include -Iarm9/overlays/21/include -Iarm9/overlays/52/include -Iarm9/overlays/59/include -include global.h"
|
||||
DEFINES="-DDIAMOND"
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user