nsprpub/tools/Makefile.in

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nsprpub/tools/Makefile.in	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,184 @@
     1.4 +# 
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +#! gmake
    1.10 +
    1.11 +MOD_DEPTH	= ..
    1.12 +topsrcdir	= @top_srcdir@
    1.13 +srcdir		= @srcdir@
    1.14 +VPATH		= @srcdir@
    1.15 +
    1.16 +include $(MOD_DEPTH)/config/autoconf.mk
    1.17 +
    1.18 +include $(topsrcdir)/config/config.mk
    1.19 +
    1.20 +ifeq ($(OS_TARGET), WIN16)
    1.21 +OS_CFLAGS = $(OS_EXE_CFLAGS)
    1.22 +endif
    1.23 +
    1.24 +
    1.25 +DIRS =
    1.26 +
    1.27 +CSRCS =             \
    1.28 +	httpget.c	    \
    1.29 +	tail.c		    \
    1.30 +	$(NULL)
    1.31 +
    1.32 +ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
    1.33 +PROG_SUFFIX = .exe
    1.34 +else
    1.35 +PROG_SUFFIX =
    1.36 +endif
    1.37 +
    1.38 +PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=$(PROG_SUFFIX)))
    1.39 +
    1.40 +TARGETS = $(PROGS)
    1.41 +
    1.42 +INCLUDES = -I$(dist_includedir) 
    1.43 +
    1.44 +NSPR_VERSION = 3
    1.45 +
    1.46 +# Setting the variables LDOPTS and LIBPR.  We first initialize
    1.47 +# them to the default values, then adjust them for some platforms.
    1.48 +LDOPTS = -L$(dist_libdir)
    1.49 +LIBPR = -lnspr$(NSPR_VERSION)
    1.50 +LIBPLC = -lplc$(NSPR_VERSION)
    1.51 +
    1.52 +ifeq ($(OS_ARCH), WINNT)
    1.53 +ifeq ($(OS_TARGET), WIN16)
    1.54 +  LIBPR = $(dist_libdir)/nspr$(NSPR_VERSION).lib
    1.55 +  LIBPLC= $(dist_libdir)/plc$(NSPR_VERSION).lib
    1.56 +else
    1.57 +LDOPTS = -NOLOGO -DEBUG -INCREMENTAL:NO
    1.58 +LIBPR = $(dist_libdir)/libnspr$(NSPR_VERSION).$(LIB_SUFFIX)
    1.59 +LIBPLC= $(dist_libdir)/libplc$(NSPR_VERSION).$(LIB_SUFFIX)
    1.60 +endif
    1.61 +endif
    1.62 +
    1.63 +ifeq ($(OS_ARCH),OS2)
    1.64 +LDOPTS += -Zomf -Zlinker /PM:VIO
    1.65 +endif
    1.66 +
    1.67 +ifneq ($(OS_ARCH), WINNT)
    1.68 +PWD = $(shell pwd)
    1.69 +endif
    1.70 +
    1.71 +ifeq ($(OS_ARCH), IRIX)
    1.72 +LDOPTS += -rpath $(PWD)/$(dist_libdir)
    1.73 +endif
    1.74 +
    1.75 +ifeq ($(OS_ARCH), OSF1)
    1.76 +LDOPTS += -rpath $(PWD)/$(dist_libdir) -lpthread
    1.77 +endif
    1.78 +
    1.79 +ifeq ($(OS_ARCH), HP-UX)
    1.80 +LDOPTS += -Wl,+s,+b,$(PWD)/$(dist_libdir)
    1.81 +endif
    1.82 +
    1.83 +# AIX
    1.84 +ifeq ($(OS_ARCH),AIX)
    1.85 +LDOPTS += -blibpath:$(PWD)/$(dist_libdir):/usr/lib:/lib
    1.86 +LIBPR = -lnspr$(NSPR_VERSION)_shr
    1.87 +LIBPLC = -lplc$(NSPR_VERSION)_shr
    1.88 +endif
    1.89 +
    1.90 +# Solaris
    1.91 +ifeq ($(OS_ARCH), SunOS)
    1.92 +ifdef NS_USE_GCC
    1.93 +LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(dist_libdir)
    1.94 +else
    1.95 +LDOPTS += -R $(PWD)/$(dist_libdir)
    1.96 +endif
    1.97 +
    1.98 +# SunOS 5.5 needs to link with -lpthread, even though we already
    1.99 +# linked with this system library when we built libnspr.so.
   1.100 +ifeq ($(OS_RELEASE), 5.5)
   1.101 +ifdef USE_PTHREADS
   1.102 +EXTRA_LIBS = -lpthread
   1.103 +endif
   1.104 +endif
   1.105 +endif # SunOS
   1.106 +
   1.107 +ifeq ($(OS_ARCH), SCOOS)
   1.108 +# SCO Unix needs to link against -lsocket again even though we
   1.109 +# already linked with these system libraries when we built libnspr.so.
   1.110 +EXTRA_LIBS = -lsocket
   1.111 +# This hardcodes in the executable programs the directory to find
   1.112 +# libnspr.so etc. at program startup.  Equivalent to the -R or -rpath 
   1.113 +# option for ld on other platforms.
   1.114 +export LD_RUN_PATH = $(PWD)/$(dist_libdir)
   1.115 +endif
   1.116 +
   1.117 +#####################################################
   1.118 +#
   1.119 +# The rules
   1.120 +#
   1.121 +#####################################################
   1.122 +
   1.123 +include $(topsrcdir)/config/rules.mk
   1.124 +
   1.125 +AIX_PRE_4_2 = 0
   1.126 +ifeq ($(OS_ARCH),AIX)
   1.127 +ifneq ($(OS_RELEASE),4.2)
   1.128 +ifneq ($(USE_PTHREADS), 1)
   1.129 +#AIX_PRE_4_2 = 1
   1.130 +endif
   1.131 +endif
   1.132 +endif
   1.133 +
   1.134 +ifeq ($(AIX_PRE_4_2),1)
   1.135 +
   1.136 +# AIX releases prior to 4.2 need a special two-step linking hack
   1.137 +# in order to both override the system select() and be able to 
   1.138 +# get at the original system select().
   1.139 +#
   1.140 +# We use a pattern rule in ns/nspr20/config/rules.mk to generate
   1.141 +# the .$(OBJ_SUFFIX) file from the .c source file, then do the
   1.142 +# two-step linking hack below.
   1.143 +
   1.144 +$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
   1.145 +	@$(MAKE_OBJDIR)
   1.146 +	rm -f $@ $(AIX_TMP)
   1.147 +	$(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(dist_libdir)/libnspr$(NSPR_VERSION).a
   1.148 +	$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
   1.149 +	rm -f $(AIX_TMP)
   1.150 +
   1.151 +else
   1.152 +
   1.153 +# All platforms that are not AIX pre-4.2.
   1.154 +
   1.155 +$(OBJDIR)/%$(PROG_SUFFIX): $(OBJDIR)/%.$(OBJ_SUFFIX)
   1.156 +	@$(MAKE_OBJDIR)
   1.157 +ifeq ($(OS_ARCH), WINNT)
   1.158 +ifeq ($(OS_TARGET),WIN16)
   1.159 +	echo system windows >w16link
   1.160 +	echo option map >>w16link
   1.161 +	echo option stack=10K >>w16link
   1.162 +	echo option heapsize=32K >>w16link
   1.163 +	echo debug $(DEBUGTYPE) all >>w16link
   1.164 +	echo name $@  >>w16link
   1.165 +	echo file >>w16link
   1.166 +	echo $<  >>w16link
   1.167 +	echo library  >>w16link
   1.168 +	echo $(LIBPR),	     >>w16link
   1.169 +	echo $(LIBPLC),		 >>w16link
   1.170 +	echo winsock.lib     >>w16link
   1.171 +	wlink @w16link.
   1.172 +else
   1.173 +	link $(LDOPTS) $< $(LIBPR) $(LIBPLC) ws2_32.lib -out:$@
   1.174 +endif
   1.175 +else
   1.176 +ifeq ($(OS_ARCH),OS2)
   1.177 +	$(LINK) $(LDOPTS) $< $(LIBPR) $(LIBPLC) $(OS_LIBS) $(EXTRA_LIBS) -o $@
   1.178 +else
   1.179 +	$(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPR) $(LIBPLC) $(EXTRA_LIBS) -o $@
   1.180 +endif
   1.181 +endif
   1.182 +endif
   1.183 +
   1.184 +export:: $(TARGETS)
   1.185 +clean::
   1.186 +	rm -f $(TARGETS)
   1.187 +

mercurial