From 8d67851767ca2e193f405e3bd10e22ff04f1442d Mon Sep 17 00:00:00 2001 From: Evan Burkey Date: Mon, 8 Jul 2024 08:53:21 -0700 Subject: [PATCH] midway --- Makefile | 7 +++++++ src/network.c | 5 ----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4c62e57..5aa38ee 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CFLAGS = -std=c99 -Iinclude -pedantic WARNINGS= -Wall -Wextra LDFLAGS = -fPIC -shared +MACROS= -D_POSIX_C_SOURCE=1 TARGET = libflint.so SRC != ls src/*.c @@ -11,10 +12,15 @@ OBJ = $(SRC:./src/$.c=./obj/%.o) PREFIX = $(DESTDIR)/usr/local LIBDIR = $(PREFIX)/lib +OS_NAME != uname -s | tr A-Z a-z + all: $(TARGET) ./clanggen.sh $(TARGET): $(OBJ) + ifeq ($(OS_NAME),"openbsd") + @echo "Building for openbsd" +endif cc $(CFLAGS) $(WARNINGS) $(LDFLAGS) -o $(TARGET) $(OBJ) ./obj/%.o: ./src/%.c @@ -40,3 +46,4 @@ tests: manual: cc $(CFLAGS) -o netmanual tests/netmanual.c src/*.c + diff --git a/src/network.c b/src/network.c index 46c8654..637ed17 100644 --- a/src/network.c +++ b/src/network.c @@ -1,8 +1,3 @@ -// Needed for sigaction on Linux -#ifdef __linux__ -#define _POSIX_C_SOURCE 1 -#endif // __linux__ - #include #include #include