Browse code

slack: Makefile - support for FreeBSD build

- added LIBS and DEFS variables, making them consistent with
the rest of modules.

(cherry picked from commit 36baa8cda606e107308303c33c5b98cbb513c653)

drTr0jan authored on 31/05/2022 16:07:59 • Daniel-Constantin Mierla committed on 16/06/2022 07:31:40
Showing 1 changed files
... ...
@@ -8,5 +8,21 @@ include ../../Makefile.defs
8 8
 auto_gen=
9 9
 NAME=slack.so
10 10
 
11
+ifeq ($(CROSS_COMPILE),)
12
+CURL_BUILDER=$(shell \
13
+	if pkg-config --exists libcurl; then \
14
+		echo 'pkg-config libcurl'; \
15
+	else \
16
+		which curl-config; \
17
+	fi)
18
+endif
19
+
20
+ifneq ($(CURL_BUILDER),)
21
+	DEFS += $(shell $(CURL_BUILDER) --cflags )
22
+	LIBS += $(shell $(CURL_BUILDER) --libs)
23
+else
24
+	DEFS+=-I$(LOCALBASE)/include
25
+	LIBS+=-L$(LOCALBASE)/lib -lcurl
26
+endif
11 27
 
12 28
 include ../../Makefile.modules