aboutsummaryrefslogtreecommitdiff
path: root/examples/hello
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello')
-rw-r--r--examples/hello/CMakeLists.txt2
-rw-r--r--examples/hello/Makefile10
-rw-r--r--examples/hello/README.md4
-rw-r--r--examples/hello/main.c8
4 files changed, 12 insertions, 12 deletions
diff --git a/examples/hello/CMakeLists.txt b/examples/hello/CMakeLists.txt
index c22ab33..7d14ac6 100644
--- a/examples/hello/CMakeLists.txt
+++ b/examples/hello/CMakeLists.txt
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.13)
project(hello C)
add_executable(hello main.c)
-target_link_libraries(${PROJECT_NAME} PRIVATE slweb dynstr)
+target_link_libraries(${PROJECT_NAME} PRIVATE web dynstr)
diff --git a/examples/hello/Makefile b/examples/hello/Makefile
index 217bccb..275fa5a 100644
--- a/examples/hello/Makefile
+++ b/examples/hello/Makefile
@@ -3,10 +3,10 @@
PROJECT = hello
DEPS = \
main.o
-SLWEB = ../../libslweb.a
+LIBWEB = ../../libweb.a
DYNSTR = ../../dynstr/libdynstr.a
CFLAGS = -I ../../include -I ../../dynstr/include
-SLWEB_FLAGS = -L ../../ -l slweb
+LIBWEB_FLAGS = -L ../../ -l libweb
DYNSTR_FLAGS = -L ../../dynstr -l dynstr
all: $(PROJECT)
@@ -16,10 +16,10 @@ clean:
FORCE:
-$(PROJECT): $(DEPS) $(SLWEB) $(DYNSTR)
- $(CC) $(LDFLAGS) $(DEPS) $(SLWEB_FLAGS) $(DYNSTR_FLAGS) -o $@
+$(PROJECT): $(DEPS) $(LIBWEB) $(DYNSTR)
+ $(CC) $(LDFLAGS) $(DEPS) $(LIBWEB_FLAGS) $(DYNSTR_FLAGS) -o $@
-$(SLWEB): FORCE
+$(LIBWEB): FORCE
+cd ../../ && $(MAKE)
$(DYNSTR): FORCE
diff --git a/examples/hello/README.md b/examples/hello/README.md
index 7c7cf74..24b747b 100644
--- a/examples/hello/README.md
+++ b/examples/hello/README.md
@@ -1,8 +1,8 @@
# "Hello world" example
-This example shows a minimal setup for an application using `slweb`. When
+This example shows a minimal setup for an application using `libweb`. When
executed, it starts a HTTP/1.1 server on port `8080` and returns an example
-website reading "Hello from slweb!" when either `/` or `/index.html` are
+website reading "Hello from libweb!" when either `/` or `/index.html` are
accessed by clients.
## How to build
diff --git a/examples/hello/main.c b/examples/hello/main.c
index d1a3206..59643ec 100644
--- a/examples/hello/main.c
+++ b/examples/hello/main.c
@@ -1,7 +1,7 @@
#include <dynstr.h>
-#include <slweb/handler.h>
-#include <slweb/html.h>
-#include <slweb/http.h>
+#include <libweb/handler.h>
+#include <libweb/html.h>
+#include <libweb/http.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
@@ -30,7 +30,7 @@ static int hello(const struct http_payload *const pl,
fprintf(stderr, "%s: html_node_add_child p failed\n", __func__);
goto end;
}
- else if (html_node_set_value(p, "Hello from slweb!"))
+ else if (html_node_set_value(p, "Hello from libweb!"))
{
fprintf(stderr, "%s: html_node_set_value p failed\n", __func__);
goto end;