diff options
Diffstat (limited to 'base/new-c-proj')
-rwxr-xr-x | base/new-c-proj | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/base/new-c-proj b/base/new-c-proj index 982144f..48f8d83 100755 --- a/base/new-c-proj +++ b/base/new-c-proj @@ -106,6 +106,7 @@ if printf '%s\n' "$1" | grep '^lib' >/dev/null 2>/dev/null; then $1.a: \$(OBJ) x @rm -f -- \$@ x \$(AR) rc \$@ \$(OBJ) + x \$(AR) ts \$@ > /dev/null $1.\$(LIBEXT): \$(LOBJ) x \$(CC) \$(LIBFLAGS) -o \$@ \$(LOBJ) \$(LDFLAGS) @@ -115,6 +116,7 @@ if printf '%s\n' "$1" | grep '^lib' >/dev/null 2>/dev/null; then x mkdir -p -- "\$(DESTDIR)\$(PREFIX)/include" x cp -- $1.a "\$(DESTDIR)\$(PREFIX)/lib/" x cp -- $1.\$(LIBEXT) "\$(DESTDIR)\$(PREFIX)/lib/$1.\$(LIBMINOREXT)" + x \$(FIX_INSTALL_NAME) "\$(DESTDIR)\$(PREFIX)/lib/$1.\$(LIBMINOREXT)" x ln -sf -- $1.\$(LIBMINOREXT) "\$(DESTDIR)\$(PREFIX)/lib/$1.\$(LIBMAJOREXT)" x ln -sf -- $1.\$(LIBMAJOREXT) "\$(DESTDIR)\$(PREFIX)/lib/$1.\$(LIBEXT)" x cp -- $1.h "\$(DESTDIR)\$(PREFIX)/include/" @@ -141,6 +143,8 @@ if printf '%s\n' "$1" | grep '^lib' >/dev/null 2>/dev/null; then LIBFLAGS = -shared -Wl,-soname,lib\$(LIB_NAME).\$(LIBEXT).\$(LIB_MAJOR) LIBMAJOREXT = \$(LIBEXT).\$(LIB_MAJOR) LIBMINOREXT = \$(LIBEXT).\$(LIB_VERSION) + + FIX_INSTALL_NAME = : EOF cat <<-EOF | sed 's/x\t/\t/g' > mk/macos.mk @@ -148,13 +152,17 @@ if printf '%s\n' "$1" | grep '^lib' >/dev/null 2>/dev/null; then 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/$1.\$(LIBMAJOREXT)" EOF cat <<-EOF | sed 's/x\t/\t/g' > mk/windows.mk LIBEXT = dll - LIBFLAGS = -mdll + LIBFLAGS = -shared LIBMAJOREXT = \$(LIB_MAJOR).\$(LIBEXT) LIBMINOREXT = \$(LIB_VERSION).\$(LIBEXT) + + FIX_INSTALL_NAME = : EOF else printf '%s\n' "/$1" >> .gitignore |