1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
--- Makefile.defs.orig 2016-05-30 14:13:27 UTC
+++ Makefile.defs
@@ -118,6 +118,14 @@ ifeq ($(OS),solaris)
ISSMP ?= yes
endif
else
+ifeq ($(OS),freebsd)
+ SMP_STR = $(shell sysctl kern.smp.active | grep 1)
+ ifeq (,$(SMP_STR))
+ ISSMP ?= no
+ else
+ ISSMP ?= yes
+ endif
+else
SMP_STR = $(shell uname -v | grep -i "SMP")
ifeq (,$(SMP_STR))
ISSMP ?= no
@@ -125,6 +133,7 @@ else
ISSMP ?= yes
endif
endif
+endif
#set some vars from the environment (and not make builtins)
CC := $(shell echo "$${CC}")
@@ -308,6 +317,9 @@ cfg_dir = etc/$(MAIN_NAME)/
bin_dir = sbin/
ARCH_B = $(shell echo $(ARCH) | sed -e 's/.*64.*/64b/')
+ifeq ($(OS),freebsd)
+ LIBDIR ?= lib
+else
ifeq ($(ARCH_B),64b)
LIBDIR ?= lib64
else
@@ -315,6 +327,7 @@ else
# assume 32b - it is not really used further
ARCH_B=32b
endif
+endif
lib_dir = $(LIBDIR)/$(MAIN_NAME)
modules_dir = $(LIBDIR)/$(MAIN_NAME)/modules/
|