]> err.no Git - sope/blob - libFoundation/sharedlib.mak
added NSCopying to EOQualifier
[sope] / libFoundation / sharedlib.mak
1 #  sharedlib.mak
2 #
3 #  Copyright (C) 1995, 1996, 1997 Ovidiu Predescu and Mircea Oancea.
4 #  All rights reserved.
5 #
6 #  Author: Ovidiu Predescu <ovidiu@bx.logicnet.ro>
7 #  Date: March 1997
8 #
9 #  This file is part of libFoundation.
10 #
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
15 #  documentation.
16 #
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.
23 #
24
25
26 HAVE_SHARED_LIBS        = no
27 SHARED_LIB_DIR          = $(libdir)
28 SHARED_OBJDIR           = $(OBJDIR)
29
30 #
31 # OpenStep 4.x
32 #
33 ifeq ($(TARGET_OS), nextstep4)
34 HAVE_SHARED_LIBS        = yes
35 SHARED_LIB_DIR          = $(libdir)
36 SHARED_OBJDIR           = shared_obj
37
38 ifeq ($(WITH_GC), yes)
39 GC_LIB  = -lgc
40 endif
41
42 SHARED_LIB_LINK_CMD     = \
43         libtool -dynamic -read_only_relocs suppress -o $@ \
44                 -framework System -L$(SHARED_LIB_DIR) -lobjc -lgcc $(GC_LIB) $^
45
46 INSTALL_SHARED_LIB_CMD  = \
47         cp $(LIB_FOUNDATION_NAME) \
48                 $(SHARED_LIB_DIR)/$(LIB_FOUNDATION_NAME)
49
50 ADDITIONAL_CC_FLAGS     += -dynamic
51 shared_libext   = .a
52 endif
53
54
55 #
56 # Linux ELF
57 #
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) $^
64
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))
70
71 ADDITIONAL_CC_FLAGS     += -fPIC
72 shared_libext   = .so
73 endif
74
75
76 #
77 # Solaris
78 #
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     = \
84         $(CC) -G -o $@ $^
85
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))
91
92 ADDITIONAL_CC_FLAGS     += -fpic -fPIC
93 shared_libext   = .so
94 endif