Add some tweaks for FreeBSD; no sound curses interface.
authorDavid Griffith <dave@661.org>
Wed, 4 Sep 2019 06:56:52 +0000 (23:56 -0700)
committerDavid Griffith <dave@661.org>
Wed, 4 Sep 2019 06:56:52 +0000 (23:56 -0700)
Makefile

index 236330dea7daa73045da659961bec4aea6251f2d..97279d185eb4344b46e540007ea0d4d60f3fe78f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,8 +2,8 @@
 # GNU make is required.
 
 # Your C compiler
-CC=gcc
-#CC=clang
+CC ?= gcc
+#CC ?= clang
 
 # Your DOS C Compiler (Watcom)
 WCC=wcc
@@ -25,6 +25,9 @@ ifneq ($(OS),Windows_NT)
        CURSES_CFLAGS += -I/usr/pkg/include/ncurses -I/usr/pkg/include/ncursesw 
        SDL_LDFLAGS += -lexecinfo
     endif
+    ifeq ($(UNAME_S),FreeBSD)
+       FREEBSD = yes
+    endif
     ifeq ($(UNAME_S),Linux)
        NPROCS = $(shell grep -c ^processor /proc/cpuinfo)
     endif
@@ -309,6 +312,9 @@ endif
 ifeq ($(USE_UTF8), yes)
        @echo "#define USE_UTF8" >> $@
 endif
+ifdef FREEBSD
+       @echo "#define __BSD_VISIBLE 1" >> $@
+endif
 ifdef MACOS
        @echo "#define _DARWIN_C_SOURCE" >> $@
        @echo "#define _XOPEN_SOURCE 600" >> $@