Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop installing multiple copies of the shared library. #76

Merged
merged 2 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading