summaryrefslogtreecommitdiff
path: root/tools/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Makefile.in')
-rw-r--r--tools/Makefile.in52
1 files changed, 32 insertions, 20 deletions
diff --git a/tools/Makefile.in b/tools/Makefile.in
index bff44750..0b872d7a 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -38,7 +38,7 @@ CSRCS = \
tail.c \
$(NULL)
-ifeq ($(OS_ARCH), WINNT)
+ifeq (,$(filter-out WINNT OS2,$(OS_ARCH)))
PROG_SUFFIX = .exe
else
PROG_SUFFIX =
@@ -48,25 +48,35 @@ PROGS = $(addprefix $(OBJDIR)/, $(CSRCS:.c=$(PROG_SUFFIX)))
TARGETS = $(PROGS)
-INCLUDES = -I$(DIST)/include
+INCLUDES = -I$(dist_includedir)
NSPR_VERSION = 3
# Setting the variables LDOPTS and LIBPR. We first initialize
# them to the default values, then adjust them for some platforms.
-LDOPTS = -L$(DIST)/lib
+LDOPTS = -L$(dist_libdir)
LIBPR = -lnspr$(NSPR_VERSION)
LIBPLC = -lplc$(NSPR_VERSION)
ifeq ($(OS_ARCH), WINNT)
ifeq ($(OS_TARGET), WIN16)
- LIBPR = $(DIST)/lib/nspr$(NSPR_VERSION).lib
- LIBPLC= $(DIST)/lib/plc$(NSPR_VERSION).lib
+ LIBPR = $(dist_libdir)/nspr$(NSPR_VERSION).lib
+ LIBPLC= $(dist_libdir)/plc$(NSPR_VERSION).lib
else
LDOPTS = -NOLOGO -DEBUG -DEBUGTYPE:CV -INCREMENTAL:NO
-LIBPR = $(DIST)/lib/libnspr$(NSPR_VERSION).$(LIB_SUFFIX)
-LIBPLC= $(DIST)/lib/libplc$(NSPR_VERSION).$(LIB_SUFFIX)
+LIBPR = $(dist_libdir)/libnspr$(NSPR_VERSION).$(LIB_SUFFIX)
+LIBPLC= $(dist_libdir)/libplc$(NSPR_VERSION).$(LIB_SUFFIX)
+endif
endif
+
+ifeq ($(OS_ARCH),OS2)
+ ifeq ($(MOZ_OS2_TOOLS),VACPP)
+ LDOPTS = -NOE -DEBUG -nologo -PMTYPE:VIO
+ LIBPR = $(dist_libdir)/nspr$(NSPR_VERSION).lib
+ LIBPLC= $(dist_libdir)/plc$(NSPR_VERSION).lib
+ else
+ LDOPTS += -Zomf -Zlinker /PM:VIO
+ endif
endif
ifneq ($(OS_ARCH), WINNT)
@@ -74,20 +84,20 @@ PWD = $(shell pwd)
endif
ifeq ($(OS_ARCH), IRIX)
-LDOPTS += -rpath $(PWD)/$(DIST)/lib
+LDOPTS += -rpath $(PWD)/$(dist_libdir)
endif
ifeq ($(OS_ARCH), OSF1)
-LDOPTS += -rpath $(PWD)/$(DIST)/lib -lpthread
+LDOPTS += -rpath $(PWD)/$(dist_libdir) -lpthread
endif
ifeq ($(OS_ARCH), HP-UX)
-LDOPTS += -Wl,+s,+b,$(PWD)/$(DIST)/lib
+LDOPTS += -Wl,+s,+b,$(PWD)/$(dist_libdir)
endif
# AIX
ifeq ($(OS_ARCH),AIX)
-LDOPTS += -blibpath:$(PWD)/$(DIST)/lib:/usr/lib:/lib
+LDOPTS += -blibpath:$(PWD)/$(dist_libdir):/usr/lib:/lib
LIBPR = -lnspr$(NSPR_VERSION)_shr
LIBPLC = -lplc$(NSPR_VERSION)_shr
endif
@@ -96,9 +106,9 @@ endif
ifeq ($(OS_ARCH), SunOS)
ifneq ($(OS_RELEASE), 4.1.3_U1)
ifdef NS_USE_GCC
-LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(DIST)/lib
+LDOPTS += -Xlinker -R -Xlinker $(PWD)/$(dist_libdir)
else
-LDOPTS += -R $(PWD)/$(DIST)/lib
+LDOPTS += -R $(PWD)/$(dist_libdir)
endif
endif
@@ -122,8 +132,8 @@ ifeq ($(OS_ARCH), NCR)
# XXX: We see some strange problems when we link with libnspr.so.
# So for now we use static libraries on NCR. The shared library
# stuff below is commented out.
-LIBPR = $(DIST)/lib/libnspr$(NSPR_VERSION).a
-LIBPLC = $(DIST)/lib/libplc$(NSPR_VERSION).a
+LIBPR = $(dist_libdir)/libnspr$(NSPR_VERSION).a
+LIBPLC = $(dist_libdir)/libplc$(NSPR_VERSION).a
EXTRA_LIBS = -lsocket -lnsl -ldl
# NCR needs to link against -lsocket -lnsl (and -lc, which is linked
@@ -133,7 +143,7 @@ EXTRA_LIBS = -lsocket -lnsl -ldl
# This hardcodes in the executable programs the directory to find
# libnspr.so etc. at program startup. Equivalent to the -R or -rpath
# option for ld on other platforms.
-#export LD_RUN_PATH = $(PWD)/$(DIST)/lib
+#export LD_RUN_PATH = $(PWD)/$(dist_libdir)
endif
ifeq ($(OS_ARCH), SCOOS)
@@ -143,7 +153,7 @@ EXTRA_LIBS = -lsocket
# This hardcodes in the executable programs the directory to find
# libnspr.so etc. at program startup. Equivalent to the -R or -rpath
# option for ld on other platforms.
-export LD_RUN_PATH = $(PWD)/$(DIST)/lib
+export LD_RUN_PATH = $(PWD)/$(dist_libdir)
endif
#####################################################
@@ -176,7 +186,7 @@ ifeq ($(AIX_PRE_4_2),1)
$(OBJDIR)/%: $(OBJDIR)/%.$(OBJ_SUFFIX)
@$(MAKE_OBJDIR)
rm -f $@ $(AIX_TMP)
- $(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(DIST)/lib/libnspr$(NSPR_VERSION).a
+ $(CC) $(AIX_LINK_OPTS) -o $(AIX_TMP) $< $(dist_libdir)/libnspr$(NSPR_VERSION).a
$(CC) -o $@ $(AIX_TMP) $(AIX_WRAP)
rm -f $(AIX_TMP)
@@ -205,13 +215,15 @@ else
link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@
endif
else
+ifeq ($(OS_ARCH),OS2)
+ $(LINK) $(LDOPTS) $< $(LIBPR) $(LIBPLC) $(OS_LIBS) $(EXTRA_LIBS) -o $@
+else
$(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPR) $(LIBPLC) $(EXTRA_LIBS) -o $@
endif
-
+endif
endif
export:: $(TARGETS)
-install:: export
clean::
rm -f $(TARGETS)