summaryrefslogtreecommitdiffstats
path: root/main/lua-subprocess/makefile.patch
blob: 6ae43ec54f29f5ceb732154df541e2035aaa05f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ LUA_CFLAGS := $(shell pkg-config --cflags --libs $(lua_package))
 all: subprocess.so subprocess.html
 
 subprocess.so: $(SOURCES)
-	$(CC) $(CFLAGS) $(LUA_CFLAGS) -DOS_POSIX -shared -fPIC -o $@ $(SOURCES)
+	$(CC) $(CFLAGS) $(LUA_CFLAGS) -DOS_POSIX -DSHARE_LIOLIB -shared -fPIC -o $@ $(SOURCES)
 
 subprocess.html: subprocess.txt
 	$(ASCIIDOC) $<
@@ -36,7 +36,8 @@ clean:
 
 .PHONY: install
 install: subprocess.so
-	$(INSTALL) -m755 subprocess.so $(INSTALL_CMOD)/
+	mkdir -p $(DESTDIR)$(INSTALL_CMOD)/
+	$(INSTALL) -m755 subprocess.so $(DESTDIR)$(INSTALL_CMOD)/
 
 .PHONY: uninstall
 uninstall: