Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing the makefile to build on ubuntu 64 bit #1

Open
fps opened this issue May 2, 2012 · 3 comments
Open

Fixing the makefile to build on ubuntu 64 bit #1

fps opened this issue May 2, 2012 · 3 comments

Comments

@fps
Copy link

fps commented May 2, 2012

diff --git a/Makefile b/Makefile
index 05952a2..2c51bc9 100644
--- a/Makefile
+++ b/Makefile
@@ -7,14 +7,14 @@ VERSION := 0.02
DISTDIR := lua-subprocess-$(VERSION)
DISTFILES := Makefile $(SOURCES) liolib-copy.h subprocess.txt subprocess.html

-INSTALL_CMOD := $(shell pkg-config --variable=INSTALL_CMOD lua)
+INSTALL_CMOD := $(shell pkg-config --variable=INSTALL_CMOD lua5.1)

ifeq ($(INSTALL_CMOD),)
$(error Lua package not found)
endif

CFLAGS ?= -Wall -Wextra -pedantic -O2
-LUA_CFLAGS := $(shell pkg-config --cflags --libs lua)
+LUA_CFLAGS := $(shell pkg-config --cflags --libs lua5.1)

.PHONY: all
all: subprocess.so subprocess.html
@@ -31,6 +31,7 @@ clean:

.PHONY: install
install: subprocess.so

  •   $(INSTALL) -d -m755 $(INSTALL_CMOD)/
    $(INSTALL) -m755 subprocess.so $(INSTALL_CMOD)/
    

    .PHONY: uninstall

@fps
Copy link
Author

fps commented May 2, 2012

oops, the markup mangled the diff.. should be rather clear though :D

@xlq
Copy link
Owner

xlq commented May 2, 2012

Thanks for the patch. My OS (Arch Linux) has no "lua5.1" package though, so I've edited the makefile to use "lua" and fall back on "lua5.1" if "lua" is not found.

@fps
Copy link
Author

fps commented May 3, 2012

Oh ok.. I suppose ununtu is doing it wrong then :D And also it won't work anymore as soon as lua5.2 comes along. Maybe there's a generic way to handle this.

On another note though: I also had to add the line

+ $(INSTALL) -d -m755 $(INSTALL_CMOD)/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants