From fb296822ecbaef026b43a0d2837e3733f641cd3a Mon Sep 17 00:00:00 2001 From: Dendy Date: Sun, 7 Feb 2021 10:28:22 +0100 Subject: [PATCH] Fix Makefiles --- Makefile | 2 +- README.md | 3 ++- examples/nodetree/Makefile | 13 ++++++++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index a6ed1d8..4bfb921 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,6 @@ $(DIR): clean: rm -rf build - rm -f libnode.so + rm -f libnodesystem.so # end diff --git a/README.md b/README.md index 5ffd1d3..bf8db41 100644 --- a/README.md +++ b/README.md @@ -4,4 +4,5 @@ Just a library for handling node logic inside C, inspired by Godot, mainly focus For now there's a basic Node struct and a Node2D that "inherits" from it. -You can find examples of basic usage in main.c +To compile and run the examples just do "make run" on their folders + diff --git a/examples/nodetree/Makefile b/examples/nodetree/Makefile index c60dd16..2a5071b 100644 --- a/examples/nodetree/Makefile +++ b/examples/nodetree/Makefile @@ -7,11 +7,18 @@ CC="tcc" SRC=main.c -main: $(SRC) - tcc -o $@ -I ../include $(SRC) -lnodesystem -L/strg/prgm/c/nodesystem +main: $(SRC) ../../libnodesystem.so + tcc -o $@ -I ../../include $(SRC) -lnodesystem -L../../ run: main - LD_LIBRARY_PATH=..:$LD_LIBRARY_PATH ./main + LD_LIBRARY_PATH=../..:$LD_LIBRARY_PATH ./main + +full: $(SRC) + make -C ../../ + tcc -o main -I ../../include $(SRC) -lnodesystem -L../../ + +../../libnodesystem.so: + make -C ../../ clean: rm -rf main