aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-10-02 18:50:20 +1300
committerArslaan Pathan <[email protected]>2026-10-02 18:50:20 +1300
commit68bc96f76ad2de4077bc2a9916f4facbefe5f739 (patch)
tree3d10708a00701d743e2630f311368aa8b09be235
parent94f81786312be03df47744d56951e092eb9af52f (diff)
downloadParadox-68bc96f76ad2de4077bc2a9916f4facbefe5f739.tar.xz
Paradox-68bc96f76ad2de4077bc2a9916f4facbefe5f739.zip
Build system setup and basic PXObject class implementation
-rw-r--r--README.md12
-rw-r--r--include/Paradox/Core.h6
-rw-r--r--include/Paradox/Object.h10
-rw-r--r--meson.build23
-rw-r--r--src/Object.m19
5 files changed, 70 insertions, 0 deletions
diff --git a/README.md b/README.md
index 017cfa7..4f8fbef 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,15 @@
# Paradox
Application framework for Objective-C built from first principles.
+
+## Dependencies
+
+### Runtime
+
+- `libobjc2`
+
+### Build
+
+- Any Objective-C-capable compiler (preferably Clang/LLVM)
+- `meson`
+- `ninja`
diff --git a/include/Paradox/Core.h b/include/Paradox/Core.h
new file mode 100644
index 0000000..2506399
--- /dev/null
+++ b/include/Paradox/Core.h
@@ -0,0 +1,6 @@
+#ifndef PARADOX_CORE_H
+#define PARADOX_CORE_H
+
+#include <Paradox/Object.h>
+
+#endif
diff --git a/include/Paradox/Object.h b/include/Paradox/Object.h
new file mode 100644
index 0000000..e51c733
--- /dev/null
+++ b/include/Paradox/Object.h
@@ -0,0 +1,10 @@
+#ifndef PARADOX_OBJECT_H
+#define PARADOX_OBJECT_H
+
+@interface PXObject
++ (instancetype)alloc;
+- (instancetype)init;
+- (void)dealloc;
+@end
+
+#endif
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..aa9cc96
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,23 @@
+project('paradox', 'objc', version: '0.0.1')
+
+add_project_arguments('-Wno-objc-root-class', '-Werror', '-pedantic', '-Wall', language: 'objc')
+
+deps = []
+deps += dependency('libobjc') # This is libobjc2, not libobjc - do not be fooled
+
+inc = include_directories('include')
+
+sources = [
+ 'src/Object.m',
+]
+
+paradox = static_library('paradox', sources, include_directories: inc, dependencies: deps, install: true, install_dir: 'lib')
+
+install_headers(
+ 'include/Paradox/Core.h',
+ 'include/Paradox/Object.h',
+ subdir: 'paradox'
+)
+
+pkg = import('pkgconfig')
+pkg.generate(paradox, subdirs: 'paradox', version: '0.0.1', name: 'paradox', filebase: 'paradox', description: 'Application framework for Objective-C built from first principles.', requires: ['libobjc'])
diff --git a/src/Object.m b/src/Object.m
new file mode 100644
index 0000000..d6fd2cb
--- /dev/null
+++ b/src/Object.m
@@ -0,0 +1,19 @@
+#include <Paradox/Object.h>
+#include <objc/objc.h>
+#include <objc/runtime.h>
+
+@implementation PXObject
+
++ (instancetype)alloc {
+ return (id)class_createInstance(self, 0);
+}
+
+- (instancetype)init {
+ return self;
+}
+
+- (void)dealloc {
+ object_dispose(self);
+}
+
+@end