$NetBSD: patch-ca,v 1.3 2005/12/29 22:50:53 joerg Exp $ --- interface/Makefile.in.orig 1999-12-14 04:27:59.000000000 +0000 +++ interface/Makefile.in @@ -21,9 +21,7 @@ CPPFLAGS+=-D_REENTRANT OFILES = scan_devices.o common_interface.o cooked_interface.o interface.o\ scsi_interface.o smallft.o toc.o test_interface.o -export VERSION - -all: lib slib +all: slib debug: $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)" @@ -32,26 +30,24 @@ lib: $(MAKE) libcdda_interface.a CFLAGS="$(OPT)" slib: - $(MAKE) lessmessy - $(MAKE) libcdda_interface.so CFLAGS="$(OPT) -fpic" - [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so libcdda_interface.so.0 + $(MAKE) libcdda_interface.la VERSION=$(VERSION) CFLAGS="$(OPT)" test: + $(MAKE) lessmessy $(MAKE) libcdda_interface.a CFLAGS="$(DEBUG)" $(CC) $(DEBUG) -c test.c - $(LD) $(DEBUG) test.o $(LDFLAGS) -o cdda_test $(LIBS) libcdda_interface.a + $(LIBTOOL) --mode=link $(LD) $(DEBUG) test.o $(LDFLAGS) -o cdda_test $(LIBS) libcdda_interface.la + +libcdda_interface.la: $(OFILES) + $(LIBTOOL) --mode=link $(CC) -o libcdda_interface.la $(OFILES:.o=.lo) \ + -version-info 0:$(VERSION) -rpath $(PREFIX)/lib $(LDFLAGS) + +libcdda_interface.a: libcdda_interface.la -libcdda_interface.a: $(OFILES) - $(AR) -r libcdda_interface.a $(OFILES) - $(RANLIB) libcdda_interface.a - -libcdda_interface.so: $(OFILES) - $(CC) -fpic -shared -o libcdda_interface.so.0.$(VERSION) -Wl,-soname -Wl,libcdda_interface.so.0 $(OFILES) - [ -e libcdda_interface.so.0 ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so.0 - [ -e libcdda_interface.so ] || ln -s libcdda_interface.so.0.$(VERSION) libcdda_interface.so +libcdda_interface.so: libcdda_interface.la .c.o: - $(CC) $(CFLAGS) -c $< + $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $< lessmessy: -rm -f *.o core *~ *.out