3 # Copyright (C) 1995, 1996, 1997 Ovidiu Predescu and Mircea Oancea.
6 # Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
9 # This file is part of libFoundation.
11 # Permission to use, copy, modify, and distribute this software and its
12 # documentation for any purpose and without fee is hereby granted, provided
13 # that the above copyright notice appear in all copies and that both that
14 # copyright notice and this permission notice appear in supporting
17 # We disclaim all warranties with regard to this software, including all
18 # implied warranties of merchantability and fitness, in no event shall
19 # we be liable for any special, indirect or consequential damages or any
20 # damages whatsoever resulting from loss of use, data or profits, whether in
21 # an action of contract, negligence or other tortious action, arising out of
22 # or in connection with the use or performance of this software.
27 SHARED_LIB_DIR = $(libdir)
28 SHARED_OBJDIR = $(OBJDIR)
33 ifeq ($(TARGET_OS), nextstep4)
34 HAVE_SHARED_LIBS = yes
35 SHARED_LIB_DIR = $(libdir)
36 SHARED_OBJDIR = shared_obj
38 ifeq ($(WITH_GC), yes)
42 SHARED_LIB_LINK_CMD = \
43 libtool -dynamic -read_only_relocs suppress -o $@ \
44 -framework System -L$(SHARED_LIB_DIR) -lobjc -lgcc $(GC_LIB) $^
46 INSTALL_SHARED_LIB_CMD = \
47 cp $(LIB_FOUNDATION_NAME) \
48 $(SHARED_LIB_DIR)/$(LIB_FOUNDATION_NAME)
50 ADDITIONAL_CC_FLAGS += -dynamic
58 ifeq ($(findstring linux, $(TARGET_OS)), linux)
59 HAVE_SHARED_LIBS = yes
60 SHARED_LIB_DIR = $(libdir)
61 SHARED_OBJDIR = shared_obj
62 SHARED_LIB_LINK_CMD = \
63 $(CC) -shared -o $@ -Wl,-soname=$(LIB_FOUNDATION_NAME).$(VERSION) $^
65 INSTALL_SHARED_LIB_CMD = \
66 cp $(LIB_FOUNDATION_NAME) $(SHARED_LIB_DIR)/$(LIB_FOUNDATION_NAME).$(VERSION); \
67 (cd $(SHARED_LIB_DIR); \
68 rm $(LIB_FOUNDATION_NAME); \
69 ln -sf $(LIB_FOUNDATION_NAME).$(VERSION) $(LIB_FOUNDATION_NAME))
71 ADDITIONAL_CC_FLAGS += -fPIC
79 ifeq ($(findstring solaris, $(TARGET_OS)), solaris)
80 HAVE_SHARED_LIBS = yes
81 SHARED_LIB_DIR = $(libdir)
82 SHARED_OBJDIR = shared_obj
83 SHARED_LIB_LINK_CMD = \
86 INSTALL_SHARED_LIB_CMD = \
87 cp $(LIB_FOUNDATION_NAME) $(SHARED_LIB_DIR)/$(LIB_FOUNDATION_NAME).$(VERSION); \
88 (cd $(SHARED_LIB_DIR); \
89 rm $(LIB_FOUNDATION_NAME); \
90 ln -sf $(LIB_FOUNDATION_NAME).$(VERSION) $(LIB_FOUNDATION_NAME))
92 ADDITIONAL_CC_FLAGS += -fpic -fPIC