-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
10,558 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/out | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
#--------------------------------------------------------------------------------- | ||
.SUFFIXES: | ||
#--------------------------------------------------------------------------------- | ||
|
||
ifeq ($(strip $(DEVKITPRO)),) | ||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro") | ||
endif | ||
|
||
TOPDIR ?= $(CURDIR) | ||
include $(DEVKITPRO)/libnx/switch_rules | ||
|
||
#--------------------------------------------------------------------------------- | ||
# TARGET is the name of the output | ||
# BUILD is the directory where object files & intermediate files will be placed | ||
# SOURCES is a list of directories containing source code | ||
# DATA is a list of directories containing data files | ||
# INCLUDES is a list of directories containing header files | ||
# EXEFS_SRC is the optional input directory containing data copied into exefs, if anything this normally should only contain "main.npdm". | ||
#--------------------------------------------------------------------------------- | ||
TARGET := sys-clk-overlay | ||
BUILD := build | ||
OUTDIR := out | ||
RESOURCES := res | ||
SOURCES := src src/ui/gui src/ui/elements ../common/src ../common/src/client | ||
DATA := data | ||
INCLUDES := ../common/include | ||
EXEFS_SRC := exefs_src | ||
|
||
APP_TITLE := sys-clk | ||
NO_ICON := 1 | ||
|
||
#--------------------------------------------------------------------------------- | ||
# version control constants | ||
#--------------------------------------------------------------------------------- | ||
TARGET_VERSION := $(shell git describe --dirty --always --tags) | ||
APP_VERSION := $(TARGET_VERSION) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# options for code generation | ||
#--------------------------------------------------------------------------------- | ||
DEFINES := -DDISABLE_IPC -DTARGET="\"$(TARGET)\"" -DTARGET_VERSION="\"$(TARGET_VERSION)\"" | ||
|
||
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE | ||
|
||
CFLAGS := -g -Wall -O2 -ffunction-sections \ | ||
$(ARCH) $(DEFINES) | ||
|
||
CFLAGS += $(INCLUDE) -D__SWITCH__ | ||
|
||
CXXFLAGS := $(CFLAGS) -fno-exceptions -std=gnu++17 | ||
|
||
ASFLAGS := -g $(ARCH) | ||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) | ||
|
||
LIBS := -lnx | ||
|
||
#--------------------------------------------------------------------------------- | ||
# list of directories containing libraries, this must be the top level containing | ||
# include and lib | ||
#--------------------------------------------------------------------------------- | ||
LIBDIRS := $(PORTLIBS) $(LIBNX) $(TOPDIR)/lib/tesla | ||
|
||
#--------------------------------------------------------------------------------- | ||
# no real need to edit anything past this point unless you need to add additional | ||
# rules for different file extensions | ||
#--------------------------------------------------------------------------------- | ||
ifneq ($(BUILD),$(notdir $(CURDIR))) | ||
#--------------------------------------------------------------------------------- | ||
|
||
export OUTPUT := $(CURDIR)/$(OUTDIR)/$(TARGET) | ||
export TOPDIR := $(CURDIR) | ||
|
||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \ | ||
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) | ||
|
||
export DEPSDIR := $(CURDIR)/$(BUILD) | ||
|
||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c))) | ||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp))) | ||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s))) | ||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*))) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# use CXX for linking C++ projects, CC for standard C | ||
#--------------------------------------------------------------------------------- | ||
ifeq ($(strip $(CPPFILES)),) | ||
#--------------------------------------------------------------------------------- | ||
export LD := $(CC) | ||
#--------------------------------------------------------------------------------- | ||
else | ||
#--------------------------------------------------------------------------------- | ||
export LD := $(CXX) | ||
#--------------------------------------------------------------------------------- | ||
endif | ||
#--------------------------------------------------------------------------------- | ||
|
||
export OFILES := $(addsuffix .o,$(BINFILES)) \ | ||
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o) | ||
|
||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \ | ||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \ | ||
-I$(CURDIR)/$(BUILD) | ||
|
||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) | ||
|
||
export BUILD_EXEFS_SRC := $(TOPDIR)/$(EXEFS_SRC) | ||
|
||
.PHONY: $(BUILD) clean all | ||
|
||
#--------------------------------------------------------------------------------- | ||
all: $(BUILD) | ||
|
||
$(BUILD): | ||
@[ -d $@ ] || mkdir -p $@ | ||
@[ -d $(OUTDIR) ] || mkdir -p $(OUTDIR) | ||
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile | ||
|
||
#--------------------------------------------------------------------------------- | ||
clean: | ||
@echo clean ... | ||
@rm -fr $(BUILD) $(TARGET).ovl $(TARGET).nacp $(TARGET).nso $(TARGET).elf $(OUTDIR) | ||
|
||
|
||
#--------------------------------------------------------------------------------- | ||
else | ||
.PHONY: all | ||
|
||
DEPENDS := $(OFILES:.o=.d) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# main targets | ||
#--------------------------------------------------------------------------------- | ||
|
||
all: $(OUTPUT).ovl | ||
|
||
$(OUTPUT).ovl: $(OUTPUT).elf $(OUTPUT).nacp | ||
@elf2nro $< $@ --nacp=$(OUTPUT).nacp | ||
@echo "built ... $(notdir $(OUTPUT).ovl)" | ||
|
||
$(OUTPUT).elf: $(OFILES) | ||
|
||
#--------------------------------------------------------------------------------- | ||
# you need a rule like this for each extension you use as binary data | ||
#--------------------------------------------------------------------------------- | ||
%.bin.o : %.bin | ||
#--------------------------------------------------------------------------------- | ||
@echo $(notdir $<) | ||
@$(bin2o) | ||
|
||
-include $(DEPENDS) | ||
|
||
#--------------------------------------------------------------------------------------- | ||
endif | ||
#--------------------------------------------------------------------------------------- |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# These are supported funding model platforms | ||
|
||
patreon: werwolv | ||
custom: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KP7XRJAND9KWU&source=url | ||
github: WerWolv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
debug | ||
release | ||
lib | ||
*.bz2 | ||
|
||
example/build/ | ||
|
||
*.elf | ||
|
||
*.nacp | ||
|
||
*.ovl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
; DO NOT EDIT (unless you know what you are doing) | ||
; | ||
; This subdirectory is a git "subrepo", and this file is maintained by the | ||
; git-subrepo command. See https://github.com/git-commands/git-subrepo#readme | ||
; | ||
[subrepo] | ||
remote = https://github.com/WerWolv/libtesla | ||
branch = master | ||
commit = 66285245361a02e5480c7bb7dac9ef6449ae6181 | ||
parent = ba418a1a85f89e4a4cb913c718d0133edd7ff2fe | ||
method = merge | ||
cmdver = 0.4.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"name": "DKP Aarch64 Windows", | ||
"includePath": [ | ||
"C:/devkitPro/devkitA64/aarch64-none-elf/include/**", | ||
"C:/devkitPro/devkitA64/lib/gcc/aarch64-none-elf/9.2.0/include/**", | ||
"C:/devkitPro/libnx/include/**", | ||
"C:/devkitPro/portlibs/switch/include/**", | ||
"${workspaceFolder}/include/**" | ||
], | ||
"defines": [ | ||
"SWITCH", | ||
"VERSION=\"\"", | ||
"__SWITCH__", | ||
"__aarch64__" | ||
], | ||
"compilerPath": "C:/devkitPro/devkitA64/bin/aarch64-none-elf-g++", | ||
"cStandard": "c11", | ||
"cppStandard": "c++17", | ||
"intelliSenseMode": "gcc-x64" | ||
}, | ||
{ | ||
"name": "DKP Aarch64 Linux", | ||
"includePath": [ | ||
"/opt/devkitpro/devkitA64/aarch64-none-elf/include/**", | ||
"/opt/devkitpro/devkitA64/lib/gcc/aarch64-none-elf/9.2.0/include/**", | ||
"/opt/devkitpro/libnx/include/**", | ||
"/opt/devkitpro/portlibs/switch/include/**", | ||
"${workspaceFolder}/include/**" | ||
], | ||
"defines": [ | ||
"SWITCH", | ||
"VERSION=\"\"", | ||
"__SWITCH__", | ||
"__aarch64__" | ||
], | ||
"compilerPath": "/opt/devkitpro/devkitA64/bin/aarch64-none-elf-g++", | ||
"cStandard": "c11", | ||
"cppStandard": "c++17", | ||
"intelliSenseMode": "gcc-x64" | ||
} | ||
], | ||
"version": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"files.associations": { | ||
"*.tcc": "cpp", | ||
"algorithm": "cpp", | ||
"array": "cpp", | ||
"atomic": "cpp", | ||
"bit": "cpp", | ||
"cctype": "cpp", | ||
"chrono": "cpp", | ||
"clocale": "cpp", | ||
"cmath": "cpp", | ||
"condition_variable": "cpp", | ||
"cstdarg": "cpp", | ||
"cstddef": "cpp", | ||
"cstdint": "cpp", | ||
"cstdio": "cpp", | ||
"cstdlib": "cpp", | ||
"cstring": "cpp", | ||
"ctime": "cpp", | ||
"cwchar": "cpp", | ||
"cwctype": "cpp", | ||
"deque": "cpp", | ||
"unordered_map": "cpp", | ||
"vector": "cpp", | ||
"exception": "cpp", | ||
"functional": "cpp", | ||
"iterator": "cpp", | ||
"memory": "cpp", | ||
"memory_resource": "cpp", | ||
"numeric": "cpp", | ||
"optional": "cpp", | ||
"random": "cpp", | ||
"ratio": "cpp", | ||
"string": "cpp", | ||
"string_view": "cpp", | ||
"system_error": "cpp", | ||
"tuple": "cpp", | ||
"type_traits": "cpp", | ||
"utility": "cpp", | ||
"fstream": "cpp", | ||
"initializer_list": "cpp", | ||
"iosfwd": "cpp", | ||
"istream": "cpp", | ||
"limits": "cpp", | ||
"mutex": "cpp", | ||
"new": "cpp", | ||
"ostream": "cpp", | ||
"sstream": "cpp", | ||
"stdexcept": "cpp", | ||
"streambuf": "cpp", | ||
"thread": "cpp", | ||
"cinttypes": "cpp", | ||
"typeinfo": "cpp", | ||
"map": "cpp", | ||
"stack": "cpp", | ||
"list": "cpp" | ||
} | ||
} |
Oops, something went wrong.