openbsd-ports/devel/stfl/patches/patch-Makefile
ajacoutot 15ce3a1ece Import stfl-0.22.
STFL is a library which implements a curses-based widget set for text
terminals. The public STFL API is only 14 simple function calls big and
there are already generic SWIG bindings. Thus is very easy to port STFL
to additional scripting languages.
<...>

ok jasper@
2012-12-30 17:59:36 +00:00

47 lines
1.6 KiB
Plaintext

$OpenBSD: patch-Makefile,v 1.1.1.1 2012/12/30 17:59:36 ajacoutot Exp $
--- Makefile.orig Mon Oct 24 08:20:48 2011
+++ Makefile Sun Dec 30 10:31:35 2012
@@ -20,14 +20,14 @@
include Makefile.cfg
-export CC = gcc -pthread
-export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
-export LDLIBS += -lncursesw
+export CC ?= gcc -pthread
+export CFLAGS += -I. -Wall -ggdb -D_XOPEN_SOURCE_EXTENDED -fPIC -I${LOCALBASE}/include
+export LDLIBS += -lpthread -lncursesw -L${LOCALBASE}/lib -liconv -Wl,-R${LOCALBASE}/lib
-SONAME := libstfl.so.0
+SONAME := libstfl.so.${LIBstfl_VERSION}
VERSION := 0.22
-all: libstfl.so.$(VERSION) libstfl.a example
+all: $(SONAME) libstfl.a example
example: libstfl.a example.o
@@ -37,9 +37,9 @@ libstfl.a: public.o base.o parser.o dump.o style.o bin
ar qc $@ $^
ranlib $@
-libstfl.so.$(VERSION): public.o base.o parser.o dump.o style.o binding.o iconv.o \
+$(SONAME): public.o base.o parser.o dump.o style.o binding.o iconv.o \
$(patsubst %.c,%.o,$(wildcard widgets/*.c))
- $(CC) -shared -Wl,-soname,$(SONAME) -o $@ $(LDLIBS) $^
+ $(CC) $(CFLAGS) -shared -o $@ $(LDLIBS) $^
clean:
rm -f libstfl.a example core core.* *.o Makefile.deps
@@ -53,8 +53,8 @@ clean:
rm -f stfl.pc libstfl.so libstfl.so.*
Makefile.deps: *.c widgets/*.c *.h
- $(CC) -I. -MM *.c > Makefile.deps_new
- $(CC) -I. -MM widgets/*.c | sed 's,^wt_[^ ]*\.o: ,widgets/&,' >> Makefile.deps_new
+ $(CC) $(CFLAGS) -I. -MM *.c > Makefile.deps_new
+ $(CC) $(CFLAGS) -I. -MM widgets/*.c | sed 's,^wt_[^ ]*\.o: ,widgets/&,' >> Makefile.deps_new
mv -f Makefile.deps_new Makefile.deps
install: all stfl.pc