--- libdha/Makefile.old ons jan 28 23:40:22 2004 +++ libdha/Makefile ons jan 28 21:02:04 2004 @@ -21,6 +21,12 @@ else LIBNAME = libdha.so.$(VERSION) endif +ifeq ($(TARGET_OS),SunOS) +SHORTNAME = libdha.so +SONAME_FLAGS = -Wl,-G -Wl,-h,$(SHORTNAME) +VSHORTNAME = libdha.so.$(MAJOR_VERSION) +else +endif SRCS=libdha.c mtrr.c pci.c pci_names.c OBJS=$(SRCS:.c=.o) @@ -51,11 +57,17 @@ ifeq ($(TARGET_MINGW32),yes) $(AR) r $(LIBNAME) $(OBJS) else +ifeq ($(TARGET_OS),SunOS) + $(CC) $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS) + ln -sf $(LIBNAME) $(SHORTNAME) + ln -sf $(LIBNAME) $(VSHORTNAME) +else #$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS) $(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS) ln -sf $(LIBNAME) $(SHORTNAME) ln -sf $(LIBNAME) $(VSHORTNAME) endif +endif all: $(LIBNAME) $(SHORTNAME) @@ -79,7 +91,7 @@ install: mkdir -p $(prefix)/lib - install -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME) + $(INSTALL) -m 755 -s -p $(LIBNAME) $(prefix)/lib/$(LIBNAME) rm -f $(prefix)/lib/libdha.so ln -sf $(LIBNAME) $(prefix)/lib/$(SHORTNAME) ifeq ($(TARGET_OS),OpenBSD)