blob: b5e48e5dab7fa9617c645dfdc2c2f55f109db295 (
plain)
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
|
$NetBSD: patch-src_Makefile,v 1.1 2020/07/08 12:15:08 nia Exp $
- macOS proper link flags for pkgsrc integration
- Respect environment variables
--- src/Makefile.orig 2016-10-03 06:43:39.000000000 +0000
+++ src/Makefile
@@ -131,10 +131,10 @@ SO_macosx=so
O_macosx=o
CC_macosx=gcc
DEF_macosx=
-CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -O2 -fno-common \
- -fvisibility=hidden
-LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o
-LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc
+CFLAGS_macosx= -I$(LUAINC) $(DEF) -Wall -fno-common \
+ -fvisibility=hidden -fPIC
+LDFLAGS_macosx=-O -shared -undefined dynamic_lookup -install_name $(prefix)/$(CDIR)/system/$(SOLIB) -o
+LD_macosx=gcc -fvisibility=hidden -fPIC
#------
# Compiler and linker settings
@@ -156,7 +156,7 @@ O_freebsd=o
CC_freebsd=gcc
DEF_freebsd=
CFLAGS_freebsd= -I$(LUAINC) $(DEF) -Wall -Wshadow -Wextra \
- -Wimplicit -O2 -ggdb3 -fpic -fvisibility=hidden
+ -Wimplicit -fPIC -fvisibility=hidden
LDFLAGS_freebsd=-O -shared -fpic -o
LD_freebsd=gcc
@@ -208,8 +208,8 @@ SOLIB=core.$(SO)
#
CC=$(CC_$(PLAT))
DEF=$(DEF_$(PLAT))
-CFLAGS=$(MYCFLAGS) $(CFLAGS_$(PLAT))
-LDFLAGS=$(MYLDFLAGS) $(LDFLAGS_$(PLAT))
+CFLAGS+=$(MYCFLAGS) $(CFLAGS_$(PLAT))
+LDFLAGS+=$(MYLDFLAGS) $(EXTRA_LDFLAGS) $(LDFLAGS_$(PLAT))
LD=$(LD_$(PLAT))
LUAINC= $(LUAINC_$(PLAT))
LUALIB= $(LUALIB_$(PLAT))
|