$NetBSD$

- Treats NetBSD like {Free,Open}BSD
- Do not force optimizations in CFLAGS and honor user-defined CFLAGS

--- Makefile.orig	2018-03-08 11:45:23.000000000 +0000
+++ Makefile
@@ -65,11 +65,18 @@ INCLUDES = -I.
 FLAGS2 =
 endif
 
+# NetBSD
+ifneq (, $(findstring netbsd, $(SYS)))
+LIBS = -lm -pthread
+INCLUDES = -I.
+FLAGS2 =
+endif
+
 # this works on llvm or real gcc
 CC = clang
 
 DEFINES = 
-CFLAGS = -g -ggdb $(FLAGS2) $(INCLUDES) $(DEFINES) -Wall -O3
+CFLAGS += $(FLAGS2) $(INCLUDES) $(DEFINES) -Wall
 .SUFFIXES: .c .cpp
 
 all: bin/masscan 
