From 828ea58b35f251edbed59e71f13a634613378750 Mon Sep 17 00:00:00 2001 From: Andre Wagner Date: Sun, 10 May 2026 08:09:43 -0500 Subject: [PATCH] . --- Makefile | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/vm.c | 0 src/tests.c | 3 +++ src/tyche.c | 7 +++++++ 4 files changed, 64 insertions(+) create mode 100644 lib/vm.c create mode 100644 src/tests.c create mode 100644 src/tyche.c diff --git a/Makefile b/Makefile index e69de29..450198e 100644 --- a/Makefile +++ b/Makefile @@ -0,0 +1,54 @@ +# user overwritable variables + +PREFIX=/usr/local + +# version + +VERSION_MAJOR=0 +VERSION_MINOR=1 + +VERSION=${VERSION_MAJOR}.${VERSION_MINOR} + +# +# generic targets +# + +all: tyche libtyche.a libtyche.so.${VERSION} + +check: tyche-test + ./tyche-test + +clean: + rm -f tyche libtyche.a libtyche.so* tyche-test src/tyche.o src/tests.o lib/vm.o + +install: tyche libtyche.a libtyche.so.${VERSION} + install libtyche.a libtyche.so.${VERSION} ${PREFIX}/lib + install tyche ${PREFIX}/bin + ln -s libfoo.so.${VERSION} libfoo.so.${VERSION_MAJOR} + ln -s libfoo.so.${VERSION_MAJOR} libfoo.so + +uninstall: + rm -f ${PREFIX}/lib/libtyche.* ${PREFIX}/bin/tyche + +# +# flags/options +# + +CFLAGS=-fPIC +LIBS= + +# +# executable files +# + +tyche: src/tyche.o libtyche.a + $(CC) -o $@ $^ ${LIBS} + +tyche-test: src/tests.o libtyche.a + $(CC) -o $@ $^ ${LIBS} + +libtyche.a: lib/vm.o + ar rcs $@ $^ + +libtyche.so.${VERSION}: lib/vm.o + $(CC) -shared -o $@ -Wl,-soname,libfoo.so.${VERSION_MAJOR} $^ \ No newline at end of file diff --git a/lib/vm.c b/lib/vm.c new file mode 100644 index 0000000..e69de29 diff --git a/src/tests.c b/src/tests.c new file mode 100644 index 0000000..0eefc1c --- /dev/null +++ b/src/tests.c @@ -0,0 +1,3 @@ +int main() +{ +} \ No newline at end of file diff --git a/src/tyche.c b/src/tyche.c new file mode 100644 index 0000000..ed4f23a --- /dev/null +++ b/src/tyche.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("This is not implemented yet.\n"); + return 1; +} \ No newline at end of file