about summary refs log tree commit diff stats
path: root/makefile
diff options
context:
space:
mode:
authorRen Kararou <[email protected]>2025-01-05 02:29:15 -0600
committerRen Kararou <[email protected]>2025-01-05 02:29:15 -0600
commit5605a5ddf3c77232b04c002a82b91e227c0f27da (patch)
tree30d5cf75759aa4bd2e8e75d5a7c852931e114066 /makefile
parent70a46fab050c3fdf38b9c72453f6e678cc8341be (diff)
downloadnbtpd-5605a5ddf3c77232b04c002a82b91e227c0f27da.tar.gz
nbtpd-5605a5ddf3c77232b04c002a82b91e227c0f27da.tar.bz2
nbtpd-5605a5ddf3c77232b04c002a82b91e227c0f27da.zip
builds on illumos, freebsd, and linux
Diffstat (limited to 'makefile')
-rw-r--r--makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/makefile b/makefile
index 696ac71..c7d9caf 100644
--- a/makefile
+++ b/makefile
@@ -2,6 +2,14 @@ CC:=clang
 CFLAGS:=-march=native -O3 -funroll-loops -Wall -Wextra -Werror
 LDFLAGS:=-flto=thin -lpthread
 
+ifeq ($(shell uname),SunOS)
+CC = gcc
+LDFLAGS += -lsocket
+CFLAGS += -std=gnu11
+else
+CFLAGS += -std=c11
+endif
+
 INCLUDES=-Iinc/
 
 OBJECTS=obj/main.o obj/packet.o obj/netascii.o obj/handlers.o