######################################################################
#
#    Child Makefile used to build open SSL.
#
######################################################################

# Root directory for netos.
BASEDIR=../..

LIBS_DIR = $(BASEDIR)/$(LIBDIR)
PRIVATE_LIB_DIR = $(LIBDIR)

# Include the parent makefile.
# DIGI WDS PORT (start)
all:
	echo "making all"
	mkdir -p ./$(PRIVATE_LIB_DIR)
	make -f Makefile.ssl PROCESSOR=$(PROCESSOR) BASEDIR=$(realpath $(BASEDIR)) TOOLSET=$(TOOLSET) LIBS_DIR=$(LIBS_DIR) OBJDIR=$(OBJS)
	./../../bin/timestampkiller.exe $(BASEDIR)/$(LIBDIR)/libcrypto.a
	cp $(BASEDIR)/$(LIBDIR)/libcrypto.a $(BASEDIR)/$(LIBDIR)/libcryptodbg.a
	cp ./ssl/ossl_libtls.a ./$(PRIVATE_LIB_DIR)

# Add stuff here for additional cleanup
localclean: clean_my_objs
	rm -f $(BASEDIR)/$(LIBDIR)/libcrypto*.a
	rm -f ./$(PRIVATE_LIB_DIR)/ossl_libtls.a
	make -f Makefile.ssl clean OBJDIR=$(OBJS) TOOLSET=$(TOOLSET) LIBS_DIR=$(LIBS_DIR)
# DIGI WDS PORT (end)

component_clobber: clean_my_libs

-include $(BASEDIR)/Makefile.inc

# Location of object files.
OBJS = ./objs/$(PROCESSOR)/$(ENDIANDIR)/$(TOOLSET)

#
# The list of source directories.
#
# DIGI WDS PORT: Use correct directory (was openssl - 0.9.8g had the same)
SRCDIR=$(BASEDIR)/src/openssl102e

#
# The name and path of the library to be built.
#
ifeq ($(DEBUG), on)
LOCAL_LIB = $(BASEDIR)/$(LIBDIR)/libcryptodbg.a
else
LOCAL_LIB = $(BASEDIR)/$(LIBDIR)/libcrypto.a
endif




#
# Search path for source header files, specific to this library
#
INCDIRS += -I./../../h -I./../../h/threadx -I./../../h/tcpip -I./../../src/bsp/h


#
# Additional defines used by open SSL
#


#
# List of C object files for this library.
#
CC_OBJ=

#
# List of C++ object files.
#
C_OBJ=./crypto/ex_data.o

#
# List of assembly object files.
#
S_OBJ=

-include $(BASEDIR)/Makefile.bld


