fnet.c

Simple C networking library
git clone git://git.finwo.net/lib/fnet.c
Log | Files | Refs | README

commit 4f9737a57aebd7c455284cc29e822d3b1d0e9d96
parent 3dd93a7dff8c7bd29c9bbd911e824aab36d3e2f6
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Mon, 23 Oct 2023 21:41:31 +0200

Add include dir for ws2 on windows

Diffstat:
M.github/workflows/build.yml | 14+++++++-------
MMakefile | 34++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml @@ -20,13 +20,13 @@ jobs: steps: - uses: actions/checkout@v3 - # - name: Install dependencies (windows) - # run: | - # mkdir external - # mkdir external\\tools - # mkdir external\\libs - # curl -sSLo "external\\tools\\nuget.exe" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe - # external\\tools\\nuget install Microsoft.Web.Webview2 -Verbosity quiet -Version "1.0.1150.38" -OutputDirectory "external\\libs" || exit /b 1 + - name: Install dependencies (windows) + run: | + mkdir external + mkdir external\\tools + mkdir external\\libs + curl -sSLo "external\\tools\\nuget.exe" https://dist.nuget.org/win-x86-commandline/latest/nuget.exe + external\\tools\\nuget install Vanara.PInvoke.Ws2_32 -Verbosity quiet -Version "3.4.17" -OutputDirectory "external\\libs" || exit /b 1 - shell: bash run: | diff --git a/Makefile b/Makefile @@ -12,6 +12,40 @@ override CFLAGS?=-Wall -s -O2 INCLUDES:= INCLUDES+=-I src +ifeq ($(OS),Windows_NT) + # CFLAGS += -D WIN32 + override CFLAGS+=-I external/libs/Vanara.PInvoke.Ws2_32.3.4.17/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) + endif + ifeq ($(UNAME_S),Darwin) + # CFLAGS += -D OSX + 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 +endif + include lib/.dep/config.mk OBJ:=$(SRC:.c=.o)