VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/nsprpub/lib/tests/Makefile.in@ 89890

最後變更 在這個檔案從89890是 1,由 vboxsync 提交於 55 年 前

import

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 6.9 KB
 
1#
2# ***** BEGIN LICENSE BLOCK *****
3# Version: MPL 1.1/GPL 2.0/LGPL 2.1
4#
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/
9#
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.
14#
15# The Original Code is the Netscape Portable Runtime (NSPR).
16#
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.
21#
22# Contributor(s):
23#
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.
35#
36# ***** END LICENSE BLOCK *****
37
38#! gmake
39
40MOD_DEPTH = ../..
41topsrcdir = @top_srcdir@
42srcdir = @srcdir@
43VPATH = @srcdir@
44
45include $(MOD_DEPTH)/config/autoconf.mk
46
47include $(topsrcdir)/config/config.mk
48
49ifeq ($(OS_ARCH), WINNT)
50# DIRS = windows
51endif
52
53ifeq ($(OS_TARGET), WIN16)
54OS_CFLAGS = $(OS_EXE_CFLAGS)
55endif
56
57CSRCS = \
58 arena.c \
59 string.c \
60 base64t.c
61
62ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
63CSRCS += arena.c
64endif
65
66ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
67PROG_SUFFIX = .exe
68else
69PROG_SUFFIX =
70endif
71
72PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=$(PROG_SUFFIX)))
73
74TARGETS = $(PROGS) $(OBJS)
75
76INCLUDES = -I$(dist_includedir)
77
78# Setting the variables LDOPTS and LIBPR. We first initialize
79# them to the default values, then adjust them for some platforms.
80LDOPTS = -L$(dist_libdir)
81LIBPR = -lnspr$(MOD_MAJOR_VERSION)
82LIBPLC = -lplc$(MOD_MAJOR_VERSION)
83LIBPLDS = -lplds$(MOD_MAJOR_VERSION)
84
85ifeq ($(OS_ARCH), WINNT)
86ifeq ($(OS_TARGET), WIN16)
87 LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).lib
88 LIBPLC= $(dist_libdir)/plc$(MOD_MAJOR_VERSION).lib
89 LIBPLDS= $(dist_libdir)/plds$(MOD_MAJOR_VERSION).lib
90else
91 LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
92 ifeq ($(OS_TARGET), WIN95)
93 LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
94 LIBPLC= $(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
95 LIBPLDS= $(dist_libdir)/plds$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
96 else
97 LIBPR = $(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
98 LIBPLC= $(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
99 LIBPLDS= $(dist_libdir)/libplds$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
100 endif
101endif
102endif
103
104ifeq ($(OS_ARCH),OS2)
105 ifeq ($(MOZ_OS2_TOOLS),VACPP)
106 LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO /S:32768
107 LIBPR = $(dist_libdir)/nspr$(MOD_MAJOR_VERSION).lib
108 LIBPLC = $(dist_libdir)/plc$(MOD_MAJOR_VERSION).lib
109 LIBPLDS= $(dist_libdir)/plds$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)
110 else
111 LDOPTS += -Zomf -Zlinker /PM:VIO
112 endif
113endif
114
115ifneq ($(OS_ARCH), WINNT)
116PWD = $(shell pwd)
117endif
118
119ifeq ($(OS_ARCH), IRIX)
120LDOPTS += -rpath $(PWD)/$(dist_libdir)
121endif
122
123ifeq ($(OS_ARCH), Linux)
124 ifeq ($(OS_RELEASE), 1.2)
125 EXTRA_LIBS = -ldl
126 else
127 LDOPTS += -Xlinker -rpath $(PWD)/$(dist_libdir)
128 ifeq ($(USE_PTHREADS),1)
129 EXTRA_LIBS = -lpthread
130 endif
131 endif
132endif
133
134ifeq ($(OS_ARCH), OSF1)
135LDOPTS += -rpath $(PWD)/$(dist_libdir) -lpthread
136endif
137
138ifeq ($(OS_ARCH), HP-UX)
139LDOPTS += -Wl,+s,+b,$(PWD)/$(dist_libdir)
140endif
141
142# AIX
143ifeq ($(OS_ARCH),AIX)
144LDOPTS += -blibpath:$(PWD)/$(dist_libdir):/usr/lib:/lib
145LIBPR = -lnspr$(MOD_MAJOR_VERSION)_shr
146LIBPLC = -lplc$(MOD_MAJOR_VERSION)_shr
147endif
148
149# Solaris
150ifeq ($(OS_ARCH), SunOS)
151ifneq ($(OS_RELEASE), 4.1.3_U1)
152ifdef NS_USE_GCC
153LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(dist_libdir)
154else
155LDOPTS += -R $(PWD)/$(dist_libdir)
156endif
157endif
158
159# SunOS 5.4 and 5.5 need to link with -lthread or -lpthread,
160# even though we already linked with these system libraries
161# when we built libnspr.so.
162ifeq ($(OS_RELEASE), 5.4)
163EXTRA_LIBS = -lthread
164endif
165
166ifeq ($(OS_RELEASE), 5.5)
167ifdef USE_PTHREADS
168EXTRA_LIBS = -lpthread
169else
170EXTRA_LIBS = -lthread
171endif
172endif
173endif # SunOS
174
175ifeq ($(OS_ARCH), NCR)
176# NCR needs to link against -lsocket -lnsl (and -lc, which is linked
177# implicitly by $(CC)) again even though we already linked with these
178# system libraries when we built libnspr.so.
179EXTRA_LIBS = -lsocket -lnsl
180# This hardcodes in the executable programs the directory to find
181# libnspr.so etc. at program startup. Equivalent to the -R or -rpath
182# option for ld on other platforms.
183export LD_RUN_PATH = $(PWD)/$(dist_libdir)
184endif
185
186#####################################################
187#
188# The rules
189#
190#####################################################
191
192include $(topsrcdir)/config/rules.mk
193
194AIX_PRE_4_2 = 0
195ifeq ($(OS_ARCH),AIX)
196ifneq ($(OS_RELEASE),4.2)
197ifneq ($(USE_PTHREADS), 1)
198#AIX_PRE_4_2 = 1
199endif
200endif
201endif
202
203ifeq ($(AIX_PRE_4_2),1)
204
205# AIX releases prior to 4.2 need a special two-step linking hack
206# in order to both override the system select() and be able to
207# get at the original system select().
208#
209# We use a pattern rule in ns/nspr20/config/rules.mk to generate
210# the .$(OBJ_SUFFIX) file from the .c source file, then do the
211# two-step linking hack below.
212
213$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
214 @$(MAKE_OBJDIR)
215 rm -f $@ $(AIX_TMP)
216 $(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).a
217 $(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
218 rm -f $(AIX_TMP)
219
220else
221
222# All platforms that are not AIX pre-4.2.
223
224$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
225 @$(MAKE_OBJDIR)
226
227ifeq ($(OS_ARCH), WINNT)
228ifeq ($(OS_TARGET),WIN16)
229 echo system windows >w16link
230 echo option map >>w16link
231 echo option stack=10K >>w16link
232 echo option heapsize=32K >>w16link
233 echo debug $(DEBUGTYPE) all >>w16link
234 echo name $@ >>w16link
235 echo file >>w16link
236 echo $< >>w16link
237 echo library >>w16link
238 echo $(LIBPR), >>w16link
239 echo $(LIBPLC), >>w16link
240 echo winsock.lib >>w16link
241 wlink @w16link.
242else
243 link $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) wsock32.lib -out:$@
244endif
245else
246ifeq ($(OS_ARCH),OS2)
247 $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS)
248else
249 $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@
250endif
251endif
252endif
253
254export:: $(TARGETS)
255clean::
256 rm -f $(TARGETS)
257
258
259
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette