| 1 |
# |
| 2 |
# This Source Code Form is subject to the terms of the Mozilla Public |
| 3 |
# License, v. 2.0. If a copy of the MPL was not distributed with this |
| 4 |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 5 |
|
| 6 |
|
| 7 |
MOD_DEPTH = ../../../.. |
| 8 |
topsrcdir = @top_srcdir@ |
| 9 |
srcdir = @srcdir@ |
| 10 |
VPATH = @srcdir@ |
| 11 |
|
| 12 |
include $(MOD_DEPTH)/config/autoconf.mk |
| 13 |
|
| 14 |
include $(topsrcdir)/config/config.mk |
| 15 |
|
| 16 |
CSRCS = \ |
| 17 |
unix.c \ |
| 18 |
unix_errors.c \ |
| 19 |
uxproces.c \ |
| 20 |
uxrng.c \ |
| 21 |
uxshm.c \ |
| 22 |
uxwrap.c \ |
| 23 |
$(NULL) |
| 24 |
|
| 25 |
ifneq ($(USE_PTHREADS),1) |
| 26 |
CSRCS += uxpoll.c |
| 27 |
endif |
| 28 |
|
| 29 |
ifeq ($(PTHREADS_USER),1) |
| 30 |
CSRCS += pthreads_user.c |
| 31 |
endif |
| 32 |
|
| 33 |
CSRCS += $(PR_MD_CSRCS) |
| 34 |
ASFILES += $(PR_MD_ASFILES) |
| 35 |
|
| 36 |
TARGETS = $(OBJS) |
| 37 |
|
| 38 |
ifeq ($(OS_ARCH),SunOS) |
| 39 |
ifeq ($(CPU_ARCH),sparc) |
| 40 |
ifdef USE_64 |
| 41 |
ULTRASPARC_ASFILES = os_SunOS_sparcv9.s |
| 42 |
ULTRASPARC_ASOBJS = $(addprefix $(OBJDIR)/,$(ULTRASPARC_ASFILES:.s=.$(OBJ_SUFFIX))) |
| 43 |
else |
| 44 |
LIBRARY_NAME = $(ULTRASPARC_LIBRARY) |
| 45 |
LIBRARY_VERSION = $(MOD_MAJOR_VERSION) |
| 46 |
ULTRASPARC_ASFILES = os_SunOS_ultrasparc.s |
| 47 |
ULTRASPARC_ASOBJS = $(addprefix $(OBJDIR)/,$(ULTRASPARC_ASFILES:.s=.$(OBJ_SUFFIX))) |
| 48 |
TARGETS += $(ULTRASPARC_ASOBJS) $(SHARED_LIBRARY) |
| 49 |
RELEASE_LIBS = $(SHARED_LIBRARY) |
| 50 |
RELEASE_LIBS_DEST = $(RELEASE_LIB_DIR)/cpu/sparcv8plus |
| 51 |
lib_subdir = cpu/sparcv8plus |
| 52 |
endif |
| 53 |
endif |
| 54 |
endif |
| 55 |
|
| 56 |
INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private |
| 57 |
|
| 58 |
DEFINES += -D_NSPR_BUILD_ |
| 59 |
|
| 60 |
include $(topsrcdir)/config/rules.mk |
| 61 |
|
| 62 |
export:: $(TARGETS) |
| 63 |
|
| 64 |
ifeq ($(OS_ARCH),SunOS) |
| 65 |
ifeq ($(CPU_ARCH),sparc) |
| 66 |
|
| 67 |
ifdef USE_64 |
| 68 |
$(ULTRASPARC_ASOBJS): $(ULTRASPARC_ASFILES) |
| 69 |
/usr/ccs/bin/as -o $@ -K PIC -P -D_ASM -D__STDC__=0 -xarch=v9 $< |
| 70 |
else |
| 71 |
$(SHARED_LIBRARY): $(ULTRASPARC_ASOBJS) |
| 72 |
$(LD) -G -z text -z endfiltee -o $@ $(ULTRASPARC_ASOBJS) |
| 73 |
$(INSTALL) -m 444 $@ $(dist_libdir)/cpu/sparcv8plus |
| 74 |
$(INSTALL) -m 444 $@ $(dist_bindir)/cpu/sparcv8plus |
| 75 |
# |
| 76 |
# The -f $(ORIGIN)/... linker flag uses the real file, after symbolic links |
| 77 |
# are resolved, as the origin. If NSDISTMODE is not "copy", libnspr4.so |
| 78 |
# will be installed as a symbolic link in $(dist_libdir), pointing to the |
| 79 |
# real libnspr4.so file in pr/src. Therefore we need to install an |
| 80 |
# additional copy of libnspr_flt4.so in pr/src/cpu/sparcv8plus. |
| 81 |
# |
| 82 |
ifneq ($(NSDISTMODE),copy) |
| 83 |
$(INSTALL) -m 444 $@ ../../cpu/sparcv8plus |
| 84 |
endif |
| 85 |
|
| 86 |
ifneq ($(NSDISTMODE),copy) |
| 87 |
clobber realclean clobber_all distclean:: |
| 88 |
rm -rf ../../cpu |
| 89 |
endif |
| 90 |
|
| 91 |
$(ULTRASPARC_ASOBJS): $(ULTRASPARC_ASFILES) |
| 92 |
/usr/ccs/bin/as -o $@ -K PIC -P -D_ASM -D__STDC__=0 -xarch=v8plus $< |
| 93 |
|
| 94 |
clean:: |
| 95 |
rm -rf $(ULTRASPARC_ASOBJS) |
| 96 |
endif |
| 97 |
|
| 98 |
endif |
| 99 |
endif |