pkgsrc/devel/lua-linenoise/patches/patch-Makefile
joerg 1be399f1ae Add lua-linenoise-0.9:
Linenoise is a delightfully simple command line library. This Lua module
is simply a binding for it.
2020-08-06 22:47:16 +00:00

24 lines
677 B
Text

$NetBSD: patch-Makefile,v 1.1 2020/08/06 22:47:16 joerg Exp $
Honor proper compiler flags.
--- Makefile.orig 2020-08-06 22:39:25.558919061 +0000
+++ Makefile
@@ -4,12 +4,14 @@ OBJECTS=linenoise.o encodings/utf8.o lin
ifeq ($(OS),Darwin)
linenoise.dylib: $(OBJECTS)
- gcc -o $@ -bundle -undefined dynamic_lookup $^ $(OPT_LIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -bundle -undefined dynamic_lookup $^ $(OPT_LIB)
else
-CFLAGS=-fPIC -I/usr/include/lua5.1
linenoise.so: $(OBJECTS)
- gcc -o $@ -shared $^ $(OPT_LIB)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -shared $^ $(OPT_LIB)
endif
+%.o: %.c
+ $(CC) -c $(CFLAGS) -fPIC $< -o $@
+
clean:
rm -f *.o encodings/*.o *.so *.dylib