Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / nsprpub / lib / libc / src / Makefile.in
blob5388f8f2a406076fbe6c8d2940358b08f7c16c9f
1 #
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
15 # The Original Code is the Netscape Portable Runtime (NSPR).
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998-2000
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
24 # Alternatively, the contents of this file may be used under the terms of
25 # either the GNU General Public License Version 2 or later (the "GPL"), or
26 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
39 #! gmake
41 MOD_DEPTH = ../../..
42 topsrcdir = @top_srcdir@
43 srcdir = @srcdir@
44 VPATH = @srcdir@
46 include $(MOD_DEPTH)/config/autoconf.mk
48 include $(topsrcdir)/config/config.mk
50 INCLUDES = -I$(dist_includedir)
52 CSRCS =\
53 plvrsion.c \
54 strlen.c \
55 strcpy.c \
56 strdup.c \
57 strcase.c \
58 strcat.c \
59 strcmp.c \
60 strchr.c \
61 strpbrk.c \
62 strstr.c \
63 strtok.c \
64 base64.c \
65 plerror.c \
66 plgetopt.c \
67 $(NULL)
69 LIBRARY_NAME = plc
70 LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
72 RELEASE_LIBS = $(TARGETS)
74 ifeq ($(OS_ARCH),WINNT)
75 RES=$(OBJDIR)/plc.res
76 RESNAME=plc.rc
77 endif # WINNT
79 ifeq ($(OS_ARCH), AIX)
80 ifeq ($(CLASSIC_NSPR),1)
81 OS_LIBS = -lc
82 else
83 OS_LIBS = -lc_r
84 endif
85 endif
87 ifeq ($(OS_ARCH),IRIX)
88 OS_LIBS = -lc
89 endif
91 ifeq ($(OS_ARCH),SunOS)
92 OS_LIBS = -lc
93 MAPFILE = $(OBJDIR)/plcmap.sun
94 GARBAGE += $(MAPFILE)
95 ifdef NS_USE_GCC
96 ifdef GCC_USE_GNU_LD
97 MKSHLIB += -Wl,--version-script,$(MAPFILE)
98 else
99 MKSHLIB += -Wl,-M,$(MAPFILE)
100 endif
101 else
102 MKSHLIB += -M $(MAPFILE)
103 endif
104 # The -R '$ORIGIN' linker option instructs this library to search for its
105 # dependencies in the same directory where it resides.
106 MKSHLIB += -R '$$ORIGIN'
107 endif
109 ifeq ($(OS_ARCH),OS2)
110 MAPFILE = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).def
111 GARBAGE += $(MAPFILE)
112 MKSHLIB += $(MAPFILE)
113 endif
115 EXTRA_LIBS = $(LIBNSPR)
117 # On NCR and SCOOS, we can't link with extra libraries when
118 # we build a shared library. If we do so, the linker doesn't
119 # complain, but we would run into weird problems at run-time.
120 # Therefore on these platforms, we link just the .o files.
121 ifeq ($(OS_ARCH),NCR)
122 EXTRA_LIBS =
123 endif
124 ifeq ($(OS_ARCH),SCOOS)
125 EXTRA_LIBS =
126 endif
128 ifdef RESOLVE_LINK_SYMBOLS
129 EXTRA_LIBS += $(OS_LIBS)
130 endif
132 include $(topsrcdir)/config/rules.mk
135 # Version information generation (begin)
137 ECHO = echo
138 TINC = $(OBJDIR)/_pl_bld.h
139 PROD = $(notdir $(SHARED_LIBRARY))
140 NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
141 SH_DATE = $(shell date "+%Y-%m-%d %T")
142 SH_NOW = $(shell $(NOW))
144 ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
145 SUF = i64
146 else
147 SUF = LL
148 endif
150 GARBAGE += $(TINC)
152 $(TINC):
153 @$(MAKE_OBJDIR)
154 @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
155 @if test ! -z "$(SH_NOW)"; then \
156 $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
157 else \
158 true; \
160 @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
163 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
164 ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
165 $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
166 else
167 $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
168 endif
170 # Version information generation (end)
174 # The Client build wants the shared libraries in $(dist_bindir),
175 # so we also install them there.
178 export:: $(TARGETS)
179 $(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
180 ifdef SHARED_LIBRARY
181 ifeq ($(OS_ARCH),HP-UX)
182 $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
183 $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir)
184 else
185 $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)
186 endif
187 endif
188 ifeq ($(MOZ_BITS),16)
189 $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
190 $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
191 endif