+#Solaris 9 with gcc + OpenSSL + Kerberos 5 + Krb4 + Shadow (32-bit)
+#Add -DOPENSSL_097 for OpenSSL 0.9.7 or later.
+solaris9g+krb5+krb4+openssl+shadow+pam+zlib:
+ $(MAKE) "MAKE=$(MAKE)" solaris2xg+krb5+krb4+openssl+shadow \
+ KTARGET=$${KTARGET:-$(@)} \
+ "KFLAGS=-DSOLARIS9 -DHDBUUCP -DDIRENT -D_FILE_OFFSET_BITS=64 \
+ -DNO_DCL_INET_ATON -DZLIB -DCK_PAM -DCK_SHADOW -DLIBDES $(KFLAGS)" \
+ "LIBS= -lpam -ldes -lz $(LIBS)"
+
+#Solaris 9 with gcc + Kerberos 4 and 5:
+solaris9g+krb5+krb4:
+ $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
+ "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
+ -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
+ -DCK_AUTHENTICATION -DCK_KERBEROS -DKRB5 -DKRB4 -DKRB524 \
+ -D_FILE_OFFSET_BITS=64 \
+ -DCK_ENCRYPTION -DCK_DES -DCK_CAST -DBIGBUFOK \
+ $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
+ "LIBS= $(K5LIB) -ltermlib -lsocket -lnsl -lm -lresolv \
+ -lkrb4 -lcrypto -lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto \
+ -ldes $(LIBS)"
+
+#Solaris 9, 10, or 11 with gcc...
+#Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
+#This target is chained to be the secure solaris9g+xxx targets below.
+solaris9g solaris10g solaris11g:
+ @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with gcc'
+ @case `uname -r` in \
+ 5.9) SOLARISVERSION="-DSOLARIS9" ;; \
+ 5.10) SOLARISVERSION="-DSOLARIS10" ;; \
+ 5.11) SOLARISVERSION="-DSOLARIS11" ;; \
+ *) SOLARISVERSION="-DSOLARIS" ;; \
+ esac ; \
+ $(MAKE) "MAKE=$(MAKE)" CC="gcc -m32" CC2="gcc -m32" xermit \
+ KTARGET=$${KTARGET:-$(@)} \
+ "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
+ -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW -funsigned-char \
+ -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
+ -DPUSH_LDTERM -DPUSH_TTCOMPAT \
+ -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
+ -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
+ "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
+
+#Solaris 9, 10, or 11 with gcc + Kerberos 5 + OpenSSL.
+#OK C-Kermit 9.0.301.
+solaris9g+krb5+ssl solaris10g+krb5+ssl solaris11g+krb5+ssl:
+ @case `openssl version` in \
+ *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
+ *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
+ *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
+ *) OPENSSLOPTION="" ;; \
+ esac ; \
+ HAVE_DES=''; \
+ DES_LIB=''; \
+ if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
+ DES_LIB='-ldes425'; \
+ HAVE_DES='-DCK_DES -DLIBDES'; \
+ echo "HAVE DES"; \
+ else echo "NO DES"; \
+ fi; \
+ GSSAPILIB=''; \
+ K5DIR=`echo $(K5LIB) | sed 's|-L||'`; \
+ echo K5DIR=$$K5DIR; \
+ if ls $$K5DIR/libgssapi_krb5* > /dev/null 2> /dev/null; then \
+ GSSAPILIB='-lgssapi_krb5'; \
+ else GSSAPILIB='-lgssapi'; \
+ fi; \
+ $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
+ "CFLAGS = -O -Usun -DSVR4 -DSOLARIS9 -DSTERMIOX -DSELECT -DFNFLOAT \
+ -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET -DBIGBUFOK \
+ -DCK_AUTHENTICATION -DCK_SSL -DZLIB -DCK_KERBEROS -DKRB5 \
+ -DCK_ENCRYPTION -DCK_CAST $$OPENSSLOPTION \
+ $$HAVE_DES $(SSLINC) $(K5INC) $(K5INC)/krb5 $(KFLAGS)" \
+ "LIBS= $(SSLLIB) $(K5LIB) -lz -lssl -ltermlib -lsocket -lnsl -lm \
+ -lresolv -lcrypto \
+ $$GSSAPILIB -lkrb5 -lcom_err -lk5crypto $$DES_LIB $(LIBS)"
+
+#Solaris 9, 10, or 11 with gcc, 64 bit build.
+#Peeking inside FILE struct not allowed in 64-bit world.
+#DON'T USE THIS ONE ON PC ARCHITECTURE - It compiles and links but won't run.
+#OK: 2009/09/25 (but not tested on Solaris 11)
+solaris9g64 solaris10g64 solaris11g64:
+ @echo 'Making C-Kermit $(CKVER) for Solaris 9++ with gcc 64-bit'
+ @case `uname -r` in \
+ 5.9) SOLARISVERSION="-DSOLARIS9" ;; \
+ 5.10) SOLARISVERSION="-DSOLARIS10" ;; \
+ 5.11) SOLARISVERSION="-DSOLARIS11" ;; \
+ *) SOLARISVERSION="-DSOLARIS" ;; \
+ esac ; \
+ $(MAKE) "MAKE=$(MAKE)" CC="gcc -m64" CC2="gcc -m64" xermit \
+ KTARGET=$${KTARGET:-$(@)} \
+ "CFLAGS = -g -O -Usun -funsigned-char \
+ -DSVR4 $$SOLARISVERSION -DNOARROWKEYS \
+ -DSTERMIOX -DSELECT -DFNFLOAT -DUSE_STRERROR -DCK_PAM -DCK_SHADOW \
+ -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
+ -DPUSH_LDTERM -DPUSH_TTCOMPAT \
+ -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET $(KFLAGS)" \
+ "LIBS= -ltermlib -lsocket -lnsl -lm -lresolv -lpam $(LIBS)"
+
+#Solaris 9, 10, or 11 with SunPro CC
+#Uses streams PTYs rather than BSD ptys as in C-Kermit 8.0 and earlier.
+#This target is chained to by the secure targets below.
+#OK C-Kermit 9.0
+solaris9 solaris10 solaris11:
+ @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with Sun CC'
+ @case `uname -r` in \
+ 5.9) SOLARISVERSION="-DSOLARIS9" ;; \
+ 5.10) SOLARISVERSION="-DSOLARIS10" ;; \
+ 5.11) SOLARISVERSION="-DSOLARIS11" ;; \
+ *) SOLARISVERSION="-DSOLARIS" ;; \
+ esac ; \
+ $(MAKE) "MAKE=$(MAKE)" xermit KTARGET=$${KTARGET:-$(@)} \
+ "CFLAGS = -O -Usun -DSVR4 $$SOLARISVERSION -DUSE_STRERROR \
+ -DSTERMIOX -DSELECT -DFNFLOAT -DCK_PAM -DCK_SHADOW \
+ -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
+ -DPUSH_LDTERM -DPUSH_TTCOMPAT \
+ -DCK_CURSES -DCK_NEWTERM -DDIRENT -DHDBUUCP -DTCPSOCKET \
+ -D_FILE_OFFSET_BITS=64 $(KFLAGS)" \
+ "LIBS= $(LIBS) -ltermlib -lsocket -lnsl -lm -lresolv -lpam"
+
+# Solaris 9, 10, or 11 with OpenSSL built with Sun CC.
+# Here's an example of how to invoke this target in case your OpenSSL
+# headers and libraries are not in /usr/local:
+#
+# make solaris9+openssl "SSLINC=" "SSLLIB=" \
+# "KFLAGS= -I/opt/openssl-0.9.8k/include -L/opt/openssl-0.9.8k/lib"
+#
+# Don't use 'make -e' because that inhibits passing of KFLAGS to
+# the base (solaris9) target.
+#
+#OK C-Kermit 9.0
+solaris9+ssl solaris10+ssl solaris11+ssl \
+solaris9+openssl solaris10+openssl solaris11+openssl:
+ @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: cc'
+ @case `openssl version` in \
+ *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
+ *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
+ *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
+ *) OPENSSLOPTION="" ;; \
+ esac ; \
+ HAVE_DES=''; \
+ DES_LIB=''; \
+ if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
+ DES_LIB='-ldes425'; \
+ HAVE_DES='-DCK_DES -DLIBDES'; \
+ echo "HAVE DES"; \
+ else echo "NO DES"; \
+ fi; \
+ $(MAKE) "MAKE=$(MAKE)" solaris9 KTARGET=$${KTARGET:-$(@)} \
+ "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
+ -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
+ "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto $(LIBS)"
+
+# Solaris 9 or later with OpenSSL, built with gcc.
+# Remove -DNO_DCL_INET_ATON if inet_aton comes up missing. This target nicely
+# chains to the solaris{9,10,11}g target but for some reason it doesn't work if
+# you add the -DFORWARD_X option, thus the solaris9g+openssl+forward_x target.
+#
+#OK: 2011/06/14
+solaris9g+ssl solaris10g+ssl solaris11g+ssl \
+solaris9g+openssl solaris10g+openssl solaris11g+openssl:
+ @echo 'Making C-Kermit $(CKVER) for Solaris 9/10/11 with OpenSSL: gcc'
+ @case `openssl version` in \
+ *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
+ *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
+ *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
+ *) OPENSSLOPTION="" ;; \
+ esac ; \
+ HAVE_DES=''; \
+ DES_LIB=''; \
+ if ls $(SSLLIB)/libdes* > /dev/null 2> /dev/null; then \
+ DES_LIB='-ldes425'; \
+ HAVE_DES='-DCK_DES -DLIBDES'; \
+ echo "HAVE DES"; \
+ else echo "NO DES"; \
+ fi; \
+ $(MAKE) "MAKE=$(MAKE)" solaris9g KTARGET=$${KTARGET:-$(@)} \
+ "KFLAGS=-DCK_AUTHENTICATION -DCK_SSL -DZLIB $$HAVE_DES \
+ -DNO_DCL_INET_ATON $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
+ "LIBS= $(SSLLIB) -lz -lssl $$DES_LIB -lcrypto $(LIBS)"
+
+# Solaris 9 or later with gcc + OpenSSL + Shadow (32-bit).
+# Remove -DNO_DCL_INET_ATON if inet_aton comes up missing.
+# Includes long file support - not sure if this was available before Solaris 9.
+# Detects Solaris version automatically.
+#
+solaris9g+openssl+forward_x:
+ @echo 'Making C-Kermit $(CKVER) for Solaris 9 or later with OpenSSL...'
+ @case `openssl version` in \
+ *0.9.7*) OPENSSLOPTION="-DOPENSSL_097" ;; \
+ *0.9.8*) OPENSSLOPTION="-DOPENSSL_098" ;; \
+ *1.[0-9].[0-9]*) OPENSSLOPTION="-DOPENSSL_100" ;; \
+ *) OPENSSLOPTION="" ;; \
+ esac ; case `uname -r` in \
+ 5.9) SOLARISVERSION="-DSOLARIS9" ;; \
+ 5.10) SOLARISVERSION="-DSOLARIS10" ;; \
+ 5.11) SOLARISVERSION="-DSOLARIS11" ;; \
+ *) SOLARISVERSION="-DSOLARIS" ;; \
+ esac ; \
+ $(MAKE) xermit KTARGET=$${KTARGET:-$(@)} CC=gcc CC2=gcc \
+ "CFLAGS = -g -O -Usun -DSVR4 $$SOLARISVERSION \
+ -DHAVE_STREAMS -DHAVE_GRANTPT -DHAVE_PTSNAME -DPUSH_PTEM \
+ -DPUSH_LDTERM -DPUSH_TTCOMPAT \
+ -DSTERMIOX -DSELECT -DFNFLOAT -DBIGBUFOK -D_FILE_OFFSET_BITS=64 \
+ -DCK_AUTHENTICATION -DCK_SSL -DCK_PAM -DCK_SHADOW -DZLIB -DLIBDES \
+ -DFORWARD_X $$OPENSSLOPTION $(SSLINC) $(KFLAGS)" \
+ "LIBS= $(SSLLIB) -lpam -ldes425 -lz -ltermlib \
+ -lsocket -lnsl -lm -lresolv -lssl -lcrypto -lpam -lz $(LIBS)"