http-server.c

Basic HTTP server and router in C
git clone git://git.finwo.net/lib/http-server.c
Log | Files | Refs | README

commit 2aec001339c9ebd84804bf3ca238f3b964500337
parent 80891c50d72d084f55426cabf76b057591bc7b63
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Mon, 25 Dec 2023 19:33:42 +0100

Add ref to epoll-shim for compiling on osx

Diffstat:
MMakefile | 39+++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -11,6 +11,45 @@ SRC+=example.c override CFLAGS?=-Wall -s -O2 +ifeq ($(OS),Windows_NT) + # CFLAGS += -D WIN32 + # override CPPFLAGS+=-I external/libs/Microsoft.Web.WebView2.1.0.1150.38/build/native/include + ifeq ($(PROCESSOR_ARCHITEW6432),AMD64) + # CFLAGS += -D AMD64 + else + ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) + # CFLAGS += -D AMD64 + endif + ifeq ($(PROCESSOR_ARCHITECTURE),x86) + # CFLAGS += -D IA32 + endif + endif +else + UNAME_S := $(shell uname -s) + ifeq ($(UNAME_S),Linux) + # CFLAGS += -D LINUX + # override CFLAGS+=$(shell pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0 glib-2.0) + # override CFLAGS+=-D _GNU_SOURCE + endif + ifeq ($(UNAME_S),Darwin) + # CFLAGS += -D OSX + override CFLAGS+=-I /usr/local/include/libepoll-shim/ + override CFLAGS+=-L /usr/local/lib -lepoll-shim + # override CFLAGS+=-D _BSD_SOURCE + endif + UNAME_P := $(shell uname -p) + ifeq ($(UNAME_P),x86_64) + # CFLAGS += -D AMD64 + endif + ifneq ($(filter %86,$(UNAME_P)),) + # CFLAGS += -D IA32 + endif + ifneq ($(filter arm%,$(UNAME_P)),) + # CFLAGS += -D ARM + endif + # TODO: flags for riscv +endif + INCLUDES:= INCLUDES+=-I src