diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | config.mk | 4 | ||||
-rw-r--r-- | mk/linux.mk | 2 | ||||
-rw-r--r-- | mk/macos.mk | 4 | ||||
-rw-r--r-- | mk/windows.mk | 4 |
5 files changed, 12 insertions, 4 deletions
@@ -41,6 +41,7 @@ $(LOBJ): $(HDR) libfonts.a: $(OBJ) @rm -f -- $@ $(AR) rc $@ $(OBJ) + $(AR) ts $@ > /dev/null libfonts.$(LIBEXT): $(LOBJ) $(CC) $(LIBFLAGS) -o $@ $(LOBJ) $(LDFLAGS) @@ -50,6 +51,7 @@ install: libfonts.a libfonts.$(LIBEXT) mkdir -p -- "$(DESTDIR)$(PREFIX)/include" cp -- libfonts.a "$(DESTDIR)$(PREFIX)/lib/" cp -- libfonts.$(LIBEXT) "$(DESTDIR)$(PREFIX)/lib/libfonts.$(LIBMINOREXT)" + $(FIX_INSTALL_NAME) "$(DESTDIR)$(PREFIX)/lib/libfonts.$(LIBMINOREXT)" ln -sf -- libfonts.$(LIBMINOREXT) "$(DESTDIR)$(PREFIX)/lib/libfonts.$(LIBMAJOREXT)" ln -sf -- libfonts.$(LIBMAJOREXT) "$(DESTDIR)$(PREFIX)/lib/libfonts.$(LIBEXT)" cp -- libfonts.h "$(DESTDIR)$(PREFIX)/include/" @@ -1,8 +1,8 @@ PREFIX = /usr MANPREFIX = $(PREFIX)/share/man -CC = cc +CC = c99 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE -CFLAGS = -std=c99 -Wall -g +CFLAGS = -Wall -g LDFLAGS = diff --git a/mk/linux.mk b/mk/linux.mk index d016d31..ad58f69 100644 --- a/mk/linux.mk +++ b/mk/linux.mk @@ -2,3 +2,5 @@ LIBEXT = so LIBFLAGS = -shared -Wl,-soname,lib$(LIB_NAME).$(LIBEXT).$(LIB_MAJOR) LIBMAJOREXT = $(LIBEXT).$(LIB_MAJOR) LIBMINOREXT = $(LIBEXT).$(LIB_VERSION) + +FIX_INSTALL_NAME = : diff --git a/mk/macos.mk b/mk/macos.mk index bd92de6..0138ee4 100644 --- a/mk/macos.mk +++ b/mk/macos.mk @@ -1,4 +1,6 @@ LIBEXT = dylib -LIBFLAGS = -dynamiclib +LIBFLAGS = -dynamiclib -Wl,-compatibility_version,$(LIB_MAJOR) -Wl,-current_version,$(LIB_VERSION) LIBMAJOREXT = $(LIB_MAJOR).$(LIBEXT) LIBMINOREXT = $(LIB_VERSION).$(LIBEXT) + +FIX_INSTALL_NAME = install_name_tool -id "$(PREFIX)/lib/libfonts.$(LIBMAJOREXT)" diff --git a/mk/windows.mk b/mk/windows.mk index e9602e1..ed5ec8d 100644 --- a/mk/windows.mk +++ b/mk/windows.mk @@ -1,4 +1,6 @@ LIBEXT = dll -LIBFLAGS = -mdll +LIBFLAGS = -shared LIBMAJOREXT = $(LIB_MAJOR).$(LIBEXT) LIBMINOREXT = $(LIB_VERSION).$(LIBEXT) + +FIX_INSTALL_NAME = : |