mirror of
https://github.com/DarkStore-3DS/Project_CTR.git
synced 2026-07-03 00:39:14 +00:00
Update MakeROM makefiles.
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
# 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 = libpolarssl
|
PROJECT_NAME = libpolarssl
|
||||||
|
|
||||||
# Project Relative Paths
|
# Project Relative Paths
|
||||||
PROJECT_PATH = $(CURDIR)
|
PROJECT_PATH = $(CURDIR)
|
||||||
PROJECT_SRC_PATH = src
|
PROJECT_SRC_PATH = src
|
||||||
@@ -23,13 +22,6 @@ ifeq ($(ROOT_PROJECT_NAME),)
|
|||||||
export ROOT_PROJECT_DEPENDENCY_PATH = $(ROOT_PROJECT_PATH)/deps
|
export ROOT_PROJECT_DEPENDENCY_PATH = $(ROOT_PROJECT_PATH)/deps
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Shared Library Definitions
|
|
||||||
PROJECT_SO_VER_MAJOR = 0
|
|
||||||
PROJECT_SO_VER_MINOR = 1
|
|
||||||
PROJECT_SO_VER_PATCH = 0
|
|
||||||
PROJECT_SONAME = $(PROJECT_NAME).so.$(PROJECT_SO_VER_MAJOR)
|
|
||||||
PROJECT_SO_FILENAME = $(PROJECT_SONAME).$(PROJECT_SO_VER_MINOR).$(PROJECT_SO_VER_PATCH)
|
|
||||||
|
|
||||||
# Project Dependencies
|
# Project Dependencies
|
||||||
PROJECT_DEPEND =
|
PROJECT_DEPEND =
|
||||||
PROJECT_DEPEND_LOCAL_DIR =
|
PROJECT_DEPEND_LOCAL_DIR =
|
||||||
@@ -58,6 +50,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
|
||||||
@@ -72,6 +66,8 @@ ifeq ($(PROJECT_PLATFORM_ARCH),)
|
|||||||
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
||||||
else ifeq ($(PROJECT_PLATFORM), MACOS)
|
else ifeq ($(PROJECT_PLATFORM), MACOS)
|
||||||
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
||||||
|
else ifeq ($(PROJECT_PLATFORM), CYGWIN_NT)
|
||||||
|
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
||||||
else
|
else
|
||||||
export PROJECT_PLATFORM_ARCH = x86_64
|
export PROJECT_PLATFORM_ARCH = x86_64
|
||||||
endif
|
endif
|
||||||
@@ -105,6 +101,15 @@ else ifeq ($(PROJECT_PLATFORM), MACOS)
|
|||||||
INC +=
|
INC +=
|
||||||
LIB +=
|
LIB +=
|
||||||
ARFLAGS = rc
|
ARFLAGS = rc
|
||||||
|
else ifeq ($(PROJECT_PLATFORM), CYGWIN_NT)
|
||||||
|
# CygWin Flags/Libs
|
||||||
|
#CC =
|
||||||
|
#CXX =
|
||||||
|
WARNFLAGS = -Wall -Wno-unused-value -Wno-unused-but-set-variable
|
||||||
|
ARCHFLAGS =
|
||||||
|
INC +=
|
||||||
|
LIB +=
|
||||||
|
ARFLAGS = cr -o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Compiler Flags
|
# Compiler Flags
|
||||||
@@ -116,11 +121,10 @@ SRC_OBJ = $(foreach dir,$(PROJECT_SRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)
|
|||||||
TESTSRC_OBJ = $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cc,.o,$(wildcard $(dir)/*.cc))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
TESTSRC_OBJ = $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cc,.o,$(wildcard $(dir)/*.cc))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
||||||
|
|
||||||
# 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 source as a static library
|
||||||
# - 'shared_lib' for building shared library
|
# - 'program' for building source as executable 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
|
# test_program can be used with program or static_lib, but program and static_lib cannot be used together
|
||||||
all: static_lib
|
all: static_lib
|
||||||
|
|
||||||
clean: clean_object_files remove_binary_dir
|
clean: clean_object_files remove_binary_dir
|
||||||
@@ -158,10 +162,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)
|
||||||
|
|||||||
@@ -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 = libyaml
|
PROJECT_NAME = libyaml
|
||||||
@@ -23,13 +23,6 @@ ifeq ($(ROOT_PROJECT_NAME),)
|
|||||||
export ROOT_PROJECT_DEPENDENCY_PATH = $(ROOT_PROJECT_PATH)/deps
|
export ROOT_PROJECT_DEPENDENCY_PATH = $(ROOT_PROJECT_PATH)/deps
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Shared Library Definitions
|
|
||||||
PROJECT_SO_VER_MAJOR = 0
|
|
||||||
PROJECT_SO_VER_MINOR = 1
|
|
||||||
PROJECT_SO_VER_PATCH = 0
|
|
||||||
PROJECT_SONAME = $(PROJECT_NAME).so.$(PROJECT_SO_VER_MAJOR)
|
|
||||||
PROJECT_SO_FILENAME = $(PROJECT_SONAME).$(PROJECT_SO_VER_MINOR).$(PROJECT_SO_VER_PATCH)
|
|
||||||
|
|
||||||
# Project Dependencies
|
# Project Dependencies
|
||||||
PROJECT_DEPEND =
|
PROJECT_DEPEND =
|
||||||
PROJECT_DEPEND_LOCAL_DIR =
|
PROJECT_DEPEND_LOCAL_DIR =
|
||||||
@@ -58,6 +51,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
|
||||||
@@ -72,6 +67,8 @@ ifeq ($(PROJECT_PLATFORM_ARCH),)
|
|||||||
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
||||||
else ifeq ($(PROJECT_PLATFORM), MACOS)
|
else ifeq ($(PROJECT_PLATFORM), MACOS)
|
||||||
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
||||||
|
else ifeq ($(PROJECT_PLATFORM), CYGWIN_NT)
|
||||||
|
export PROJECT_PLATFORM_ARCH = $(shell uname -m)
|
||||||
else
|
else
|
||||||
export PROJECT_PLATFORM_ARCH = x86_64
|
export PROJECT_PLATFORM_ARCH = x86_64
|
||||||
endif
|
endif
|
||||||
@@ -105,6 +102,15 @@ else ifeq ($(PROJECT_PLATFORM), MACOS)
|
|||||||
INC +=
|
INC +=
|
||||||
LIB +=
|
LIB +=
|
||||||
ARFLAGS = rc
|
ARFLAGS = rc
|
||||||
|
else ifeq ($(PROJECT_PLATFORM), CYGWIN_NT)
|
||||||
|
# CygWin Flags/Libs
|
||||||
|
#CC =
|
||||||
|
#CXX =
|
||||||
|
WARNFLAGS = -Wall -Wno-unused-value -Wno-unused-but-set-variable
|
||||||
|
ARCHFLAGS =
|
||||||
|
INC +=
|
||||||
|
LIB +=
|
||||||
|
ARFLAGS = cr -o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Compiler Flags
|
# Compiler Flags
|
||||||
@@ -116,11 +122,10 @@ SRC_OBJ = $(foreach dir,$(PROJECT_SRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)
|
|||||||
TESTSRC_OBJ = $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cc,.o,$(wildcard $(dir)/*.cc))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
TESTSRC_OBJ = $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cc,.o,$(wildcard $(dir)/*.cc))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
||||||
|
|
||||||
# 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 source as a static library
|
||||||
# - 'shared_lib' for building shared library
|
# - 'program' for building source as executable 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
|
# test_program can be used with program or static_lib, but program and static_lib cannot be used together
|
||||||
all: static_lib
|
all: static_lib
|
||||||
|
|
||||||
clean: clean_object_files remove_binary_dir
|
clean: clean_object_files remove_binary_dir
|
||||||
@@ -158,10 +163,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)
|
||||||
|
|||||||
+3
-10
@@ -23,13 +23,6 @@ ifeq ($(ROOT_PROJECT_NAME),)
|
|||||||
export ROOT_PROJECT_DEPENDENCY_PATH = $(ROOT_PROJECT_PATH)/deps
|
export ROOT_PROJECT_DEPENDENCY_PATH = $(ROOT_PROJECT_PATH)/deps
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Shared Library Definitions
|
|
||||||
PROJECT_SO_VER_MAJOR = 0
|
|
||||||
PROJECT_SO_VER_MINOR = 1
|
|
||||||
PROJECT_SO_VER_PATCH = 0
|
|
||||||
PROJECT_SONAME = $(PROJECT_NAME).so.$(PROJECT_SO_VER_MAJOR)
|
|
||||||
PROJECT_SO_FILENAME = $(PROJECT_SONAME).$(PROJECT_SO_VER_MINOR).$(PROJECT_SO_VER_PATCH)
|
|
||||||
|
|
||||||
# Project Dependencies
|
# Project Dependencies
|
||||||
PROJECT_DEPEND = polarssl yaml
|
PROJECT_DEPEND = polarssl yaml
|
||||||
PROJECT_DEPEND_LOCAL_DIR = libpolarssl libyaml
|
PROJECT_DEPEND_LOCAL_DIR = libpolarssl libyaml
|
||||||
@@ -129,10 +122,10 @@ SRC_OBJ = $(foreach dir,$(PROJECT_SRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)
|
|||||||
TESTSRC_OBJ = $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cc,.o,$(wildcard $(dir)/*.cc))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
TESTSRC_OBJ = $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .cc,.o,$(wildcard $(dir)/*.cc))) $(foreach dir,$(PROJECT_TESTSRC_SUBDIRS),$(subst .c,.o,$(wildcard $(dir)/*.c)))
|
||||||
|
|
||||||
# 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 source as a static library
|
||||||
# - 'program' for building the program
|
# - 'program' for building source as executable 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
|
# test_program can be used with program or static_lib, but program and static_lib cannot be used together
|
||||||
all: program
|
all: program
|
||||||
|
|
||||||
clean: clean_object_files remove_binary_dir
|
clean: clean_object_files remove_binary_dir
|
||||||
|
|||||||
Reference in New Issue
Block a user