stfl: fix makefile for on-device build support

This commit is contained in:
Leonid Pliushch 2019-08-16 15:09:25 +03:00
parent 564e4262fa
commit c6ae85b04c
2 changed files with 17 additions and 13 deletions

View File

@ -1,18 +1,23 @@
diff -Naur stfl-0.24.orig/Makefile stfl-0.24/Makefile
--- stfl-0.24.orig/Makefile 2015-02-12 14:14:33.000000000 +0100
+++ stfl-0.24/Makefile 2016-05-31 21:26:11.162048447 +0200
@@ -20,10 +20,6 @@
diff -uNr stfl-0.24/Makefile stfl-0.24.mod/Makefile
--- stfl-0.24/Makefile 2015-02-12 15:14:33.000000000 +0200
+++ stfl-0.24.mod/Makefile 2019-08-16 15:05:15.360298872 +0300
@@ -20,9 +20,12 @@
include Makefile.cfg
-export CC = gcc -pthread
-export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
-export LDLIBS += -lncursesw
-
+CC ?= gcc
+AR ?= ar
+RANLIB ?= ranlib
+
+CFLAGS += -Wall -D_GNU_SOURCE -fPIC -I.
+LDLIBS += -lncursesw
SONAME := libstfl.so.0
VERSION := 0.24
@@ -34,12 +30,12 @@
@@ -34,12 +37,12 @@
libstfl.a: public.o base.o parser.o dump.o style.o binding.o iconv.o \
$(patsubst %.c,%.o,$(wildcard widgets/*.c))
rm -f $@
@ -28,7 +33,7 @@ diff -Naur stfl-0.24.orig/Makefile stfl-0.24/Makefile
clean:
rm -f libstfl.a example core core.* *.o Makefile.deps
@@ -65,6 +61,7 @@
@@ -65,6 +68,7 @@
install -m 644 stfl.pc $(DESTDIR)$(prefix)/$(libdir)/pkgconfig/
install -m 644 libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)
ln -fs libstfl.so.$(VERSION) $(DESTDIR)$(prefix)/$(libdir)/libstfl.so
@ -36,9 +41,9 @@ diff -Naur stfl-0.24.orig/Makefile stfl-0.24/Makefile
stfl.pc: stfl.pc.in
sed 's,@VERSION@,$(VERSION),g' < $< | sed 's,@PREFIX@,$(prefix),g' > $@
diff -Naur stfl-0.24.orig/Makefile.cfg stfl-0.24/Makefile.cfg
--- stfl-0.24.orig/Makefile.cfg 2009-05-31 20:20:39.000000000 +0200
+++ stfl-0.24/Makefile.cfg 2016-05-30 05:50:59.051375377 +0200
diff -uNr stfl-0.24/Makefile.cfg stfl-0.24.mod/Makefile.cfg
--- stfl-0.24/Makefile.cfg 2009-05-31 21:20:39.000000000 +0300
+++ stfl-0.24.mod/Makefile.cfg 2019-08-16 15:20:06.621673157 +0300
@@ -20,7 +20,6 @@
export libdir ?= lib

View File

@ -12,6 +12,5 @@ TERMUX_PKG_BUILD_IN_SRC=true
termux_step_configure() {
CC+=" $CPPFLAGS"
CFLAGS+=" -fPIC -I. -D_XOPEN_SOURCE_EXTENDED=1"
LDFLAGS+=" -lncursesw -liconv"
export LDLIBS="-liconv"
}