Skip to content

Commit

Permalink
Merge pull request #76 from bodea/main
Browse files Browse the repository at this point in the history
Stop installing multiple copies of the shared library.
  • Loading branch information
bodea authored Dec 5, 2024
2 parents efa2231 + 5824715 commit 35d28bf
Show file tree
Hide file tree
Showing 11 changed files with 4 additions and 205 deletions.
16 changes: 4 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
CC ?= gcc
CFLAGS ?= -Wall -Wstrict-prototypes
CFLAGS += -fPIC
LIBRARY=libnss_cache.so
LIBRARY=libnss_cache.so.2
PREFIX=$(DESTDIR)/usr
LIBDIR=$(PREFIX)/lib
SONAME=libnss_cache.so.2
LD_SONAME=-Wl,-soname,$(SONAME)
TESTDATA=.testdata

LIBNSSCACHE = nss_cache.o compat/getpwent_r.o compat/getgrent_r.o
Expand Down Expand Up @@ -119,24 +117,18 @@ $(GETENT_DATA_TOUCH): scripts/gentestdata.sh

last_pw_errno_test: test/last_pw_errno_test.c

$(LIBRARY): LDFLAGS += -shared $(LD_SONAME)
$(LIBRARY): LDFLAGS += -shared
$(LIBRARY): $(LIBNSSCACHE)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(LIBRARY) $+

$(SONAME): $(LIBRARY)
ln -sf $(LIBRARY) $(SONAME)
ln -sf $(LIBRARY) $(SONAME).0

.PHONY: install
install: $(SONAME)
install: $(LIBRARY)
install -d $(LIBDIR)
install $(LIBRARY) $(LIBDIR)
install $(SONAME) $(LIBDIR)
install $(SONAME).0 $(LIBDIR)

.PHONY: clean
clean:
rm -f $(LIBRARY)* *.o compat/*.o *.gcov *.gcda *.gcno compat/*.gcda compat/*.gcno lookup gen_getent last_pw_errno_test
rm -f $(LIBRARY) *.o compat/*.o *.gcov *.gcda *.gcno compat/*.gcda compat/*.gcno lookup gen_getent last_pw_errno_test

.PHONY: veryclean
veryclean: clean
Expand Down
116 changes: 0 additions & 116 deletions debian/changelog

This file was deleted.

21 changes: 0 additions & 21 deletions debian/control

This file was deleted.

25 changes: 0 additions & 25 deletions debian/copyright

This file was deleted.

4 changes: 0 additions & 4 deletions debian/gbp.conf

This file was deleted.

2 changes: 0 additions & 2 deletions debian/lintian-overrides

This file was deleted.

19 changes: 0 additions & 19 deletions debian/rules

This file was deleted.

1 change: 0 additions & 1 deletion debian/source/format

This file was deleted.

1 change: 0 additions & 1 deletion debian/source/local-options

This file was deleted.

1 change: 0 additions & 1 deletion debian/source/options

This file was deleted.

3 changes: 0 additions & 3 deletions debian/watch

This file was deleted.

0 comments on commit 35d28bf

Please sign in to comment.