Fix compiler errors

This commit is contained in:
2025-07-20 21:19:58 +02:00
parent 01bf34b58d
commit 3201eac013
29 changed files with 177 additions and 94 deletions
+17 -1
View File
@@ -6,10 +6,26 @@ LFLAGS = -lssl -lcrypto
CFILES = $(shell find src -name "*.c")
HFILES = $(shell find src -name "*.h")
all: chttp.c chttp.h
EXAMPLES_CLIENT := $(basename $(shell ls examples/client/*.c 2>/dev/null))
EXAMPLES_SERVER := $(basename $(shell ls examples/server/*.c 2>/dev/null))
EXAMPLES_ENGINE := $(basename $(shell ls examples/engine/*.c 2>/dev/null))
all: chttp.c chttp.h examples
chttp.c chttp.h: $(HFILES) $(CFILES)
python misc/amalg.py
examples: $(EXAMPLES_CLIENT) $(EXAMPLES_SERVER) $(EXAMPLES_ENGINE)
examples/client/%: examples/client/%.c chttp.c chttp.h
$(CC) $(CFLAGS) $< chttp.c -o $@ $(LFLAGS)
examples/server/%: examples/server/%.c chttp.c chttp.h
$(CC) $(CFLAGS) $< chttp.c -o $@ $(LFLAGS)
examples/engine/%: examples/engine/%.c chttp.c chttp.h
$(CC) $(CFLAGS) $< chttp.c -o $@ $(LFLAGS)
clean:
rm -f client_example server_example
rm -f examples/client/* examples/server/* examples/engine/*