summaryrefslogtreecommitdiff
path: root/net/opensips/files/patch-Makefile.defs
blob: bc3b2e837b1578a682b0fcd8d0afcff90a77eeff (plain) (blame)
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	2015-08-27 15:06:47 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
 
 OSREL = $(shell uname -r)
 # numerical version (good for comparisons: A.B.C => A*1000000+B*1000+C)
@@ -162,6 +171,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
@@ -169,6 +181,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/