setenv STATBNDDIR 'CURL_A' # Static binding directory.
setenv DYNBNDDIR 'CURL' # Dynamic binding directory.
setenv SRVPGM "CURL.${SONAME}" # Service program.
+setenv CURLPGM 'CURL' # CLI tool bound program.
+setenv CURLCMD 'CURL' # CL command name.
+setenv CURLCLI 'CURLCL' # CL interface program.
setenv TGTCCSID '500' # Target CCSID of objects.
setenv DEBUG '*ALL' # Debug level.
setenv OPTIMIZE '10' # Optimization level
#include <miptrnam.h>
#include <mih/callpgmv.h>
+#ifndef CURLPGM
+#define CURLPGM "CURL"
+#endif
+
/* Variable-length string, with 16-bit length. */
typedef struct {
exitcode = -2;
}
else {
- _SYSPTR pgmptr = rslvsp(WLI_PGM, (char *) "CURL", library, _AUTH_NONE);
+ _SYSPTR pgmptr = rslvsp(WLI_PGM, (char *) CURLPGM, library, _AUTH_NONE);
_LU_Work_Area_T *luwrka = (_LU_Work_Area_T *) _LUWRKA();
parse_command_line(args->cmdargs->string, args->cmdargs->len,
< "${TOPDIR}/lib/Makefile.soname"`
export SONAME
-# Get OS/400 configuration parameters.
+# Get OS/400 configuration parameters.
. "${SCRIPTDIR}/config400.default"
if [ -f "${SCRIPTDIR}/config400.override" ]
-then . "${SCRIPTDIR}/config400.override"
+then . "${SCRIPTDIR}/config400.override"
fi
# Need to get the version definitions.
# Link modules into program.
MODULES="`echo \"${MODULES}\" | sed \"s/[^ ][^ ]*/${TARGETLIB}\/&/g\"`"
-CMD="CRTPGM PGM(${TARGETLIB}/CURL)"
+CMD="CRTPGM PGM(${TARGETLIB}/${CURLPGM})"
CMD="${CMD} ENTMOD(${TARGETLIB}/CURLMAIN)"
CMD="${CMD} MODULE(${MODULES})"
CMD="${CMD} BNDSRVPGM(${TARGETLIB}/${SRVPGM} QADRTTS)"
fi
rm -f "${IFSBIN}/curl"
-ln -s "/QSYS.LIB/${TARGETLIB}.LIB/CURL.PGM" "${IFSBIN}/curl"
+ln -s "/QSYS.LIB/${TARGETLIB}.LIB/${CURLPGM}.PGM" "${IFSBIN}/curl"
# Create the CL interface program.
if action_needed "${LIBIFSNAME}/CURLCL.PGM" "${SCRIPTDIR}/curlcl.c"
-then CMD="CRTBNDC PGM(${TARGETLIB}/CURLCL)"
+then CMD="CRTBNDC PGM(${TARGETLIB}/${CURLCLI})"
CMD="${CMD} SRCSTMF('${SCRIPTDIR}/curlcl.c')"
+ CMD="${CMD} DEFINE('CURLPGM=\"${CURLPGM}\"')"
CMD="${CMD} TGTCCSID(${TGTCCSID})"
CLcommand "${CMD}"
fi
# Create the CL command.
-if action_needed "${LIBIFSNAME}/CURL.CMD" "${SCRIPTDIR}/curl.cmd"
-then CMD="CRTCMD CMD(${TARGETLIB}/CURL) PGM(${TARGETLIB}/CURLCL)"
+if action_needed "${LIBIFSNAME}/${CURLCMD}.CMD" "${SCRIPTDIR}/curl.cmd"
+then CMD="CRTCMD CMD(${TARGETLIB}/${CURLCMD}) PGM(${TARGETLIB}/${CURLCLI})"
CMD="${CMD} SRCSTMF('${SCRIPTDIR}/curl.cmd')"
CLcommand "${CMD}"
fi