From 26e14f4143ec690a120e197a3adf547145e4ce59 Mon Sep 17 00:00:00 2001 From: midipix Date: Tue, 20 Dec 2016 20:53:41 +0000 Subject: create free-standing, libpsxscl-based project skeleton. --- project/arch.mk | 5 +++++ project/common.mk | 17 +++++++++++++++++ project/depends.mk | 0 project/extras.mk | 20 ++++++++++++++++++++ project/headers.mk | 12 ++++++++++++ project/osforce.mk | 0 project/overrides.mk | 0 project/tagver.mk | 5 +++++ project/tree.mk | 8 ++++++++ 9 files changed, 67 insertions(+) create mode 100644 project/arch.mk create mode 100644 project/common.mk create mode 100644 project/depends.mk create mode 100644 project/extras.mk create mode 100644 project/headers.mk create mode 100644 project/osforce.mk create mode 100644 project/overrides.mk create mode 100644 project/tagver.mk create mode 100644 project/tree.mk (limited to 'project') diff --git a/project/arch.mk b/project/arch.mk new file mode 100644 index 0000000..caab091 --- /dev/null +++ b/project/arch.mk @@ -0,0 +1,5 @@ +src/internal/nolibc/ntux_compiler.lo: $(PROJECT_DIR)/src/internal/nolibc/$(ARCH)/ntux_compiler.s host.tag tree.tag + $(CC) -c -o $@ $< + +src/internal/nolibc/ntux_compiler.o: $(PROJECT_DIR)/src/internal/nolibc/$(ARCH)/ntux_compiler.s host.tag tree.tag + $(CC) -c -o $@ $< diff --git a/project/common.mk b/project/common.mk new file mode 100644 index 0000000..c1491b3 --- /dev/null +++ b/project/common.mk @@ -0,0 +1,17 @@ +DRIVER_SRCS = \ + src/driver/ntux_amain.c \ + src/driver/ntux_driver_ctx.c \ + src/skin/ntux_skin_default.c \ + +INTERNAL_SRCS = \ + src/internal/nolibc/ntux_compiler.c \ + src/internal/ntux_memfn_impl.c \ + src/internal/ntux_nolibc_impl.c \ + src/internal/ntux_ntaio_impl.c \ + +APP_SRCS = \ + src/ntux.c + +COMMON_SRCS = \ + $(DRIVER_SRCS) \ + $(INTERNAL_SRCS) \ diff --git a/project/depends.mk b/project/depends.mk new file mode 100644 index 0000000..e69de29 diff --git a/project/extras.mk b/project/extras.mk new file mode 100644 index 0000000..27b746c --- /dev/null +++ b/project/extras.mk @@ -0,0 +1,20 @@ +CFLAGS_SHARED_ATTR += -DNTUX_PRE_ALPHA -DNTUX_EXPORT +CFLAGS_STATIC_ATTR += -DNTUX_PRE_ALPHA -DNTUX_STATIC +CFLAGS_APP_ATTR += -DNTUX_APP + +CFLAGS_CONFIG += -ffreestanding +CFLAGS_CONFIG += -D_MIDIPIX_FREESTANDING -D__NT$(HOST_BITS) +CFLAGS_CONFIG += -UWIN32 -U_WIN32 -U__WIN32 -U__WIN32__ +CFLAGS_CONFIG += -UWIN64 -U_WIN64 -U__WIN64 -U__WIN64__ + +src/driver/ntux_driver_ctx.o: version.tag +src/driver/ntux_driver_ctx.lo: version.tag + +LDFLAGS_COMMON += -Wl,--entry -Wl,$(HOST_UNDERSCORE)$(PACKAGE)_entry_point +LDFLAGS_COMMON += -nostdlib + +LDFLAGS_SHARED += -lpsxscl +LDFLAGS_SHARED += -Wl,--exclude-all-symbols + +LDFLAGS_APP += -lpsxscl +LDFLAGS_STATIC += -static -lpsxscl -lntapi -lpemagine -ldalist diff --git a/project/headers.mk b/project/headers.mk new file mode 100644 index 0000000..c47901c --- /dev/null +++ b/project/headers.mk @@ -0,0 +1,12 @@ +API_HEADERS = \ + $(SOURCE_DIR)/include/$(PACKAGE)/ntux.h \ + $(SOURCE_DIR)/include/$(PACKAGE)/ntux_api.h \ + +INTERNAL_HEADERS = \ + $(SOURCE_DIR)/src/internal/argv/argv.h \ + $(SOURCE_DIR)/src/internal/$(PACKAGE)_driver_impl.h \ + $(SOURCE_DIR)/src/internal/$(PACKAGE)_init_impl.h \ + $(SOURCE_DIR)/src/internal/$(PACKAGE)_memfn_impl.h \ + $(SOURCE_DIR)/src/internal/$(PACKAGE)_nolibc_impl.h \ + +ALL_HEADERS = $(API_HEADERS) $(INTERNAL_HEADERS) diff --git a/project/osforce.mk b/project/osforce.mk new file mode 100644 index 0000000..e69de29 diff --git a/project/overrides.mk b/project/overrides.mk new file mode 100644 index 0000000..e69de29 diff --git a/project/tagver.mk b/project/tagver.mk new file mode 100644 index 0000000..ab916aa --- /dev/null +++ b/project/tagver.mk @@ -0,0 +1,5 @@ +VER_NAMESPACE = NTUX + +VER_MAJOR = 0 +VER_MINOR = 0 +VER_PATCH = 0 diff --git a/project/tree.mk b/project/tree.mk new file mode 100644 index 0000000..2aadd88 --- /dev/null +++ b/project/tree.mk @@ -0,0 +1,8 @@ +tree.tag: + mkdir -p src + mkdir -p src/driver + mkdir -p src/internal + mkdir -p src/internal/nolibc + mkdir -p src/logic + mkdir -p src/skin + touch tree.tag -- cgit v1.2.3