From 4ee88984fcca86c5b0c9c4bbb7e9148c7d2fe9db Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 6 Aug 2023 16:43:57 +0200 Subject: Add hello world example --- examples/hello/Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 examples/hello/Makefile (limited to 'examples/hello/Makefile') diff --git a/examples/hello/Makefile b/examples/hello/Makefile new file mode 100644 index 0000000..217bccb --- /dev/null +++ b/examples/hello/Makefile @@ -0,0 +1,26 @@ +.POSIX: + +PROJECT = hello +DEPS = \ + main.o +SLWEB = ../../libslweb.a +DYNSTR = ../../dynstr/libdynstr.a +CFLAGS = -I ../../include -I ../../dynstr/include +SLWEB_FLAGS = -L ../../ -l slweb +DYNSTR_FLAGS = -L ../../dynstr -l dynstr + +all: $(PROJECT) + +clean: + rm -f $(DEPS) + +FORCE: + +$(PROJECT): $(DEPS) $(SLWEB) $(DYNSTR) + $(CC) $(LDFLAGS) $(DEPS) $(SLWEB_FLAGS) $(DYNSTR_FLAGS) -o $@ + +$(SLWEB): FORCE + +cd ../../ && $(MAKE) + +$(DYNSTR): FORCE + +cd ../../dynstr && $(MAKE) -- cgit v1.2.3