## -*-makefile-*-
## OS400-specific setup (for cross build)
-## Copyright (c) 1999-2005, International Business Machines Corporation and
+## Copyright (c) 1999-2012, International Business Machines Corporation and
## others. All Rights Reserved.
+# This otherwise breaks on OS400 - can't find "shell"
+CURR_FULL_DIR=.
+CURR_SRCCODE_FULL_DIR=.
+
GEN_DEPS.c= $(CC1) -E -M $(DEFS) $(CPPFLAGS)
GEN_DEPS.cc= $(CXX1) -E -M $(DEFS) $(CPPFLAGS)
# -qTERASPACE: large pointers
# -qPFROPT=*STRDONLY: Strings are read-only
COMPILE.c= $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
-COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY
+COMPILE.cc= $(CXX) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c -qTERASPACE=*YES -qSTGMDL=*INHERIT -qPFROPT=*STRDONLY -qRTTIALL
+
+## ICULD program - run bldiculd.sh in icu/as_is/os400/ to build it
+ICULD=/qsys.lib/$(OUTPUTDIR).lib/iculd.pgm
## Commands to link
## We need to use the C++ linker, even when linking C programs, since
## our libraries contain C++ code (C++ static init not called)
-LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
-LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
+LINK.c= $(ICULD) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
+LINK.cc= $(ICULD) $(CXXFLAGS) $(LDFLAGS) -qOPTION='*DUPPROC *DUPVAR'
## Commands to make a shared library
# -qALWLIBUPD: It allows the compiled service program to have dependencies on