diff -Nurd -x'*~' stfl-0.24.orig/Makefile stfl-0.24/Makefile --- stfl-0.24.orig/Makefile 2015-02-12 08:14:33.000000000 -0500 +++ stfl-0.24/Makefile 2016-07-28 04:43:33.000000000 -0400 @@ -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 CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC $(CPPFLAGS) +export LDLIBS += $(LDFLAGS) -lncursesw -liconv -SONAME := libstfl.so.0 +SHLIBEXT:= dylib +SOEXT := 0.$(SHLIBEXT) VERSION := 0.24 -all: libstfl.so.$(VERSION) libstfl.a example +all: libstfl.$(SOEXT) libstfl.a example example: libstfl.a example.o @@ -37,9 +37,9 @@ ar qc $@ $^ ranlib $@ -libstfl.so.$(VERSION): public.o base.o parser.o dump.o style.o binding.o iconv.o \ +libstfl.$(SOEXT): 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) -dynamiclib -install_name $(prefix)/lib/libstfl.$(SOEXT) -o $@ $(LDLIBS) $^ clean: rm -f libstfl.a example core core.* *.o Makefile.deps @@ -50,11 +50,11 @@ rm -f python/stfl_wrap.c python/stfl_wrap.o rm -f ruby/Makefile ruby/stfl_wrap.c ruby/stfl_wrap.o rm -f ruby/stfl.so ruby/build_ok Makefile.deps_new - rm -f stfl.pc libstfl.so libstfl.so.* + rm -f stfl.pc libstfl.so libstfl.$(SOEXT) 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) -MM *.c > Makefile.deps_new + $(CC) $(CFLAGS) -MM widgets/*.c | sed 's,^wt_[^ ]*\.o: ,widgets/&,' >> Makefile.deps_new mv -f Makefile.deps_new Makefile.deps install: all stfl.pc @@ -63,8 +63,8 @@ install -m 644 libstfl.a $(DESTDIR)$(prefix)/$(libdir) install -m 644 stfl.h $(DESTDIR)$(prefix)/include/ 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 + install -m 644 libstfl.$(SOEXT) $(DESTDIR)$(prefix)/$(libdir) + ln -fs libstfl.$(SOEXT) $(DESTDIR)$(prefix)/$(libdir)/libstfl.$(SHLIBEXT) stfl.pc: stfl.pc.in sed 's,@VERSION@,$(VERSION),g' < $< | sed 's,@PREFIX@,$(prefix),g' > $@