SubDir TOP tlsproxy ;
SubInclude TOP server ;

OrigHDRS = $(HDRS) ;

if ( $(USE_SYSTEM_CRYPTLIB) = "yes" ) {
    # this is the directory where cryptlib's header files are, if they
    # aren't in the compiler's include path.
    HDRS += /usr/local/include ;
}
else {
    SubInclude TOP cryptlib ;

    HDRS += [ FDirName $(TOP) cryptlib ] ;
}

Build tls : tlsproxy.cpp egd.cpp ;


Server tlsproxy : tls server database core encodings ;

if ( $(USE_SYSTEM_CRYPTLIB) = "yes" ) {
    # additional flags that may be needed to link against cryptlib,
    # e.g. "-pthread -L/usr/local/lib" for freebsd 5.3.
    LINKFLAGS on tlsproxy += -pthread -L/usr/local/lib ;
    # and the library itself
    LINKLIBS on tlsproxy = -lcl ;
}
else {
    LinkLibraries tlsproxy : libcl ;
}


HDRS = $(OrigHDRS) ;
