diff --git a/Makefile b/Makefile index 9f83253..01b25e1 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ INSTALL_DATA= $(INSTALL) -m 0644 # C compilation flags CFLAGS = -DPT_DEBUG -O2 -std=c99 -pedantic -Wall -Wextra -CPPFLAGS = -I$(LUA_INCDIR) -Iinclude +CPPFLAGS = -I$(LUA_INCDIR) LIBFLAG = -fPIC -shared # The -Wl,-E tells the linker to not throw away unused Lua API symbols. @@ -36,7 +36,7 @@ PTRUN_LDLIBS = -llua -lm .PHONY: library examples tests all install uninstall clean library: \ - src/pt-run + pt-run examples: library \ examples/fibonacci/fibonacci.so @@ -50,30 +50,30 @@ tests: library \ spec/tracebacks/multimod/module_b.so \ spec/tracebacks/singular/module.so -all: library examples specs +all: library examples tests -install: src/pt-run include/ptracer.h - $(INSTALL_EXEC) src/pt-run $(BINDIR) - $(INSTALL_DATA) include/ptracer.h $(INCDIR) +install: pt-run ptracer.h + $(INSTALL_EXEC) pt-run $(BINDIR) + $(INSTALL_DATA) ptracer.h $(INCDIR) uninstall: rm -rf $(INCDIR)/ptracer.h rm -rf $(BINDIR)/pt-run clean: - rm -rf src/pt-run examples/*/*.so spec/tracebacks/*/*.so + rm -rf pt-run examples/*/*.so spec/tracebacks/*/*.so %.so: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LIBFLAG) $< -o $@ -src/pt-run: src/pt-run.c include/ptracer.h +pt-run: pt-run.c ptracer.h $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(PTRUN_LDFLAGS) $< -o $@ $(PTRUN_LDLIBS) -examples/fibonacci/fibonacci.so: examples/fibonacci/fibonacci.c include/ptracer.h -spec/tracebacks/anon_lua/module.so: spec/tracebacks/anon_lua/module.c include/ptracer.h -spec/tracebacks/depth_recursion/module.so: spec/tracebacks/depth_recursion/module.c include/ptracer.h -spec/tracebacks/dispatch/module.so: spec/tracebacks/dispatch/module.c include/ptracer.h -spec/tracebacks/ellipsis/module.so: spec/tracebacks/ellipsis/module.c include/ptracer.h -spec/tracebacks/multimod/module_a.so: spec/tracebacks/multimod/module_a.c include/ptracer.h -spec/tracebacks/multimod/module_b.so: spec/tracebacks/multimod/module_b.c include/ptracer.h -spec/tracebacks/singular/module.so: spec/tracebacks/singular/module.c include/ptracer.h +examples/fibonacci/fibonacci.so: examples/fibonacci/fibonacci.c ptracer.h +spec/tracebacks/anon_lua/module.so: spec/tracebacks/anon_lua/module.c ptracer.h +spec/tracebacks/depth_recursion/module.so: spec/tracebacks/depth_recursion/module.c ptracer.h +spec/tracebacks/dispatch/module.so: spec/tracebacks/dispatch/module.c ptracer.h +spec/tracebacks/ellipsis/module.so: spec/tracebacks/ellipsis/module.c ptracer.h +spec/tracebacks/multimod/module_a.so: spec/tracebacks/multimod/module_a.c ptracer.h +spec/tracebacks/multimod/module_b.so: spec/tracebacks/multimod/module_b.c ptracer.h +spec/tracebacks/singular/module.so: spec/tracebacks/singular/module.c ptracer.h diff --git a/examples/fibonacci/fibonacci.c b/examples/fibonacci/fibonacci.c index b31e406..8baf167 100644 --- a/examples/fibonacci/fibonacci.c +++ b/examples/fibonacci/fibonacci.c @@ -1,12 +1,12 @@ -/* +/* * Copyright (c) 2024, The Pallene Developers * Pallene Tracer is licensed under the MIT license. * Please refer to the LICENSE and AUTHORS files for details - * SPDX-License-Identifier: MIT + * SPDX-License-Identifier: MIT */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" /* User specific macros when Pallene Tracer debug mode is enabled. */ #ifdef PT_DEBUG diff --git a/src/pt-run.c b/pt-run.c similarity index 100% rename from src/pt-run.c rename to pt-run.c diff --git a/include/ptracer.h b/ptracer.h similarity index 100% rename from include/ptracer.h rename to ptracer.h diff --git a/spec/tracebacks/anon_lua/module.c b/spec/tracebacks/anon_lua/module.c index 6f952f9..75d0a37 100644 --- a/spec/tracebacks/anon_lua/module.c +++ b/spec/tracebacks/anon_lua/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" /* Here goes user specifc macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/depth_recursion/module.c b/spec/tracebacks/depth_recursion/module.c index dcb3da0..73901cb 100644 --- a/spec/tracebacks/depth_recursion/module.c +++ b/spec/tracebacks/depth_recursion/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/dispatch/module.c b/spec/tracebacks/dispatch/module.c index 368c649..c14317b 100644 --- a/spec/tracebacks/dispatch/module.c +++ b/spec/tracebacks/dispatch/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/ellipsis/module.c b/spec/tracebacks/ellipsis/module.c index 2b9ab6c..6dcbcf5 100644 --- a/spec/tracebacks/ellipsis/module.c +++ b/spec/tracebacks/ellipsis/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG diff --git a/spec/tracebacks/multimod/module_a.c b/spec/tracebacks/multimod/module_a.c index cfa910e..7b09776 100644 --- a/spec/tracebacks/multimod/module_a.c +++ b/spec/tracebacks/multimod/module_a.c @@ -6,7 +6,7 @@ */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" #include "module_include.h" diff --git a/spec/tracebacks/multimod/module_b.c b/spec/tracebacks/multimod/module_b.c index 2e63519..cdbd15f 100644 --- a/spec/tracebacks/multimod/module_b.c +++ b/spec/tracebacks/multimod/module_b.c @@ -6,7 +6,7 @@ */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" #include "module_include.h" diff --git a/spec/tracebacks/singular/module.c b/spec/tracebacks/singular/module.c index 46f5d04..164e374 100644 --- a/spec/tracebacks/singular/module.c +++ b/spec/tracebacks/singular/module.c @@ -7,7 +7,7 @@ /* Static use of the library would suffice. */ #define PT_IMPLEMENTATION -#include +#include "ptracer.h" /* Here goes user specific macros when Pallene Tracer debug mode is active. */ #ifdef PT_DEBUG