mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-05 08:49:03 +00:00
Update MakeROM's makefile
This commit is contained in:
+13
-7
@@ -1,6 +1,6 @@
|
|||||||
# C++/C Recursive Project Makefile
|
# C++/C Recursive Project Makefile
|
||||||
# (c) Jack
|
# (c) Jack
|
||||||
# Version 6 (20211110)
|
# Version 7 (20220413)
|
||||||
|
|
||||||
# Project Name
|
# Project Name
|
||||||
PROJECT_NAME = makerom
|
PROJECT_NAME = makerom
|
||||||
@@ -58,6 +58,8 @@ ifeq ($(PROJECT_PLATFORM),)
|
|||||||
UNAME = $(shell uname -s)
|
UNAME = $(shell uname -s)
|
||||||
ifeq ($(UNAME), Darwin)
|
ifeq ($(UNAME), Darwin)
|
||||||
export PROJECT_PLATFORM = MACOS
|
export PROJECT_PLATFORM = MACOS
|
||||||
|
else ifneq (, $(findstring CYGWIN_NT, $(UNAME)))
|
||||||
|
export PROJECT_PLATFORM = CYGWIN_NT
|
||||||
else
|
else
|
||||||
export PROJECT_PLATFORM = GNU
|
export PROJECT_PLATFORM = GNU
|
||||||
endif
|
endif
|
||||||
@@ -87,6 +89,15 @@ ifeq ($(PROJECT_PLATFORM), WIN32)
|
|||||||
INC +=
|
INC +=
|
||||||
LIB += -static
|
LIB += -static
|
||||||
ARFLAGS = cr -o
|
ARFLAGS = cr -o
|
||||||
|
else ifeq ($(PROJECT_PLATFORM), CYGWIN_NT)
|
||||||
|
# CygWin Flags/Libs
|
||||||
|
#CC =
|
||||||
|
#CXX =
|
||||||
|
WARNFLAGS = -Wall -Wno-unused-value -Wno-unused-but-set-variable
|
||||||
|
ARCHFLAGS =
|
||||||
|
INC +=
|
||||||
|
LIB += -liconv
|
||||||
|
ARFLAGS = cr -o
|
||||||
else ifeq ($(PROJECT_PLATFORM), GNU)
|
else ifeq ($(PROJECT_PLATFORM), GNU)
|
||||||
# GNU/Linux Flags/Libs
|
# GNU/Linux Flags/Libs
|
||||||
#CC =
|
#CC =
|
||||||
@@ -94,7 +105,7 @@ else ifeq ($(PROJECT_PLATFORM), GNU)
|
|||||||
WARNFLAGS = -Wall -Wno-unused-value -Wno-unused-but-set-variable
|
WARNFLAGS = -Wall -Wno-unused-value -Wno-unused-but-set-variable
|
||||||
ARCHFLAGS =
|
ARCHFLAGS =
|
||||||
INC +=
|
INC +=
|
||||||
LIB += -liconv
|
LIB +=
|
||||||
ARFLAGS = cr -o
|
ARFLAGS = cr -o
|
||||||
else ifeq ($(PROJECT_PLATFORM), MACOS)
|
else ifeq ($(PROJECT_PLATFORM), MACOS)
|
||||||
# MacOS Flags/Libs
|
# MacOS Flags/Libs
|
||||||
@@ -117,7 +128,6 @@ TESTSRC_OBJ = $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cpp,.o,$(wildcar
|
|||||||
|
|
||||||
# all is the default, user should specify what the default should do
|
# all is the default, user should specify what the default should do
|
||||||
# - 'static_lib' for building static library
|
# - 'static_lib' for building static library
|
||||||
# - 'shared_lib' for building shared library
|
|
||||||
# - 'program' for building the program
|
# - 'program' for building the program
|
||||||
# - 'test_program' for building the test program
|
# - 'test_program' for building the test program
|
||||||
# These can typically be used together however *_lib and program should not be used together
|
# These can typically be used together however *_lib and program should not be used together
|
||||||
@@ -158,10 +168,6 @@ static_lib: $(SRC_OBJ) create_binary_dir
|
|||||||
@echo LINK $(PROJECT_BIN_PATH)/$(PROJECT_NAME).a
|
@echo LINK $(PROJECT_BIN_PATH)/$(PROJECT_NAME).a
|
||||||
@ar $(ARFLAGS) "$(PROJECT_BIN_PATH)/$(PROJECT_NAME).a" $(SRC_OBJ)
|
@ar $(ARFLAGS) "$(PROJECT_BIN_PATH)/$(PROJECT_NAME).a" $(SRC_OBJ)
|
||||||
|
|
||||||
shared_lib: $(SRC_OBJ) create_binary_dir
|
|
||||||
@echo LINK $(PROJECT_BIN_PATH)/$(PROJECT_SO_FILENAME)
|
|
||||||
@gcc -shared -Wl,-soname,$(PROJECT_SONAME) -o "$(PROJECT_BIN_PATH)/$(PROJECT_SO_FILENAME)" $(SRC_OBJ)
|
|
||||||
|
|
||||||
# Build Program
|
# Build Program
|
||||||
program: $(SRC_OBJ) create_binary_dir
|
program: $(SRC_OBJ) create_binary_dir
|
||||||
@echo LINK $(PROJECT_BIN_PATH)/$(PROJECT_NAME)
|
@echo LINK $(PROJECT_BIN_PATH)/$(PROJECT_NAME)
|
||||||
|
|||||||
Reference in New Issue
Block a user