summaryrefslogtreecommitdiff
path: root/devel/lua-BitOp/patches/patch-Makefile
blob: 9c13d9bdf50497eede667da16ffdb9f63eff02d9 (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
43
44
$NetBSD: patch-Makefile,v 1.4 2021/08/01 12:39:46 nia Exp $

Install tweaks.
macOS linking

--- Makefile.orig	2012-05-08 19:15:00.000000000 +0000
+++ Makefile
@@ -3,7 +3,7 @@
 # To compile with MinGW please run: mingw32-make -f Makefile.mingw
 
 # Include path where lua.h, luaconf.h and lauxlib.h reside:
-INCLUDES= -I/usr/local/include
+INCLUDES=
 
 DEFINES=
 # Use this for the old ARM ABI with swapped FPA doubles.
@@ -11,7 +11,7 @@ DEFINES=
 #DEFINES= -DSWAPPED_DOUBLE
 
 # Lua executable name. Used to find the install path and for testing.
-LUA= lua
+LUA= lua${_LUA_DOT_VERSION}
 
 CC= gcc
 CCOPT= -O2 -fomit-frame-pointer
@@ -30,7 +30,7 @@ all: $(MODSO)
 
 # Alternative target for compiling on Mac OS X:
 macosx:
-	$(MAKE) all "SOCC=MACOSX_DEPLOYMENT_TARGET=10.4 $(CC) -dynamiclib -single_module -undefined dynamic_lookup"
+	$(MAKE) all "SOCC=$(CC)"
 
 $(MODNAME).o: $(MODNAME).c
 	$(CC) $(SOCFLAGS) -c -o $@ $<
@@ -39,7 +39,8 @@ $(MODSO): $(MODNAME).o
 	$(SOCC) $(SOLDFLAGS) -o $@ $<
 
 install: $(MODSO)
-	$(INSTALL) $< `$(INSTALLPATH) $(MODNAME)`
+	${BSD_INSTALL_LIB} ${MODSO} ${DESTDIR}${PREFIX}/${LUA_CDIR}
+	cp -r doc/* ${DESTDIR}${PREFIX}/${LUA_DOCDIR}
 
 test: $(MODSO)
 	@$(LUA) bittest.lua && echo "basic test OK"