
#
# Module name
#
#  nsssl.so   is the domestic version.
#  nsssle.so  is the export version.
#MOD       =  nsssl.so
MOD       =  nsssle.so

#
# Objects to build.
#
OBJS      =  nsssl.o ssl.o ssltcl.o t_stdlib.o x509.o

#
# Header files
#
HDRS      =  ssl.h ssltcl.h x509.h

#
# Extra libraries
#
#  BSAFE can be obtained from http://www.rsasecurity.com/.
#
MODLIBS   =  $(BSAFE)/lib/libbsafe.a

#
# Extra compiler flags
#
CFLAGS    =  -DSSL_EXPORT -DSSL -I$(BSAFE)/include

#
# Module directory
#
MODDIR    =  nsssl2


############################################################
#
# Special copy of ../include/Makefile.module appears below
#
#  Note:  This is atypical of most modules.  The standard
#         Makefile.module is usually all you will ever need.
#

include ../include/Makefile.global

all: $(MOD)

# Override LIBS variable.
LIBS=

$(MOD): $(OBJS)
	$(RM) $(MOD)
	$(LDSO) -o $(MOD) $(OBJS) $(MODLIBS)

$(OBJS): $(HDRS)

install: all
	$(RM) $(INSTBIN)/$(MOD)
	$(CP) $(MOD) $(INSTBIN)
	$(MKDIR) $(INSTMOD)/$(MODDIR)
	$(CP) keygen.tcl $(INSTMOD)/$(MODDIR)
	$(MKDIR) $(INSTSRVMOD)/$(MODDIR)

clean:
	$(RM) $(OBJS) $(MOD) so_locations

clobber: clean
	$(RM) *.so *.o *.a *~

distclean: clobber
	$(RM) TAGS core
