michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: # Config stuff for AIX. michael@0: michael@0: include $(CORE_DEPTH)/coreconf/UNIX.mk michael@0: michael@0: # michael@0: # There are two implementation strategies available on AIX: michael@0: # pthreads, and pthreads-user. The default is pthreads. michael@0: # In both strategies, we need to use pthread_user.c, instead of michael@0: # aix.c. The fact that aix.c is never used is somewhat strange. michael@0: # michael@0: # So we need to do the following: michael@0: # - Default (PTHREADS_USER not defined in the environment or on michael@0: # the command line): michael@0: # Set PTHREADS_USER=1, USE_PTHREADS=1 michael@0: # - PTHREADS_USER=1 set in the environment or on the command line: michael@0: # Do nothing. michael@0: # michael@0: ifeq ($(PTHREADS_USER),1) michael@0: USE_PTHREADS = # just to be safe michael@0: IMPL_STRATEGY = _PTH_USER michael@0: else michael@0: USE_PTHREADS = 1 michael@0: PTHREADS_USER = 1 michael@0: endif michael@0: michael@0: DEFAULT_COMPILER = xlc_r michael@0: michael@0: CC = xlc_r michael@0: CCC = xlC_r michael@0: michael@0: CPU_ARCH = rs6000 michael@0: michael@0: RANLIB = ranlib michael@0: michael@0: OS_CFLAGS = -DAIX -DSYSV michael@0: OS_LIBS += -blibpath:/usr/lib:/lib -lc -lm michael@0: michael@0: DSO_LDOPTS = -brtl -bnortllib -bM:SRE -bnoentry michael@0: MKSHLIB = $(LD) $(DSO_LDOPTS) -blibpath:/usr/lib:/lib -lc -lm michael@0: michael@0: AIX_WRAP = $(DIST)/lib/aixwrap.o michael@0: AIX_TMP = $(OBJDIR)/_aix_tmp.o michael@0: michael@0: ifdef MAPFILE michael@0: DSO_LDOPTS += -bexport:$(MAPFILE) michael@0: else michael@0: DSO_LDOPTS += -bexpall michael@0: endif michael@0: michael@0: PROCESS_MAP_FILE = grep -v ';+' $< | grep -v ';-' | \ michael@0: sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' > $@ michael@0: michael@0: ifdef BUILD_OPT michael@0: OPTIMIZER += -qmaxmem=-1 michael@0: endif michael@0: michael@0: ifeq ($(USE_64), 1) michael@0: OS_CFLAGS += -DAIX_64BIT michael@0: OBJECT_MODE=64 michael@0: export OBJECT_MODE michael@0: endif michael@0: