# Makefile - to generate header files for openssl
#
# Copyright (c) 2026 Wind River Systems, Inc.
#
# The right to copy, distribute, modify or otherwise make use
# of this software may be licensed only pursuant to the terms
# of an applicable Wind River license agreement.
#

TGT_DIR=$(WIND_BASE)/target
OSSL_PKG_NAME=openssl-3.5.0
OSSL_BUILD_DIR=$(VSB_DIR)/3pp/openssl-3.5.0

OPENSSL_DST_DIR := $(TGT_DIR)/h/openssl
CRYPTO_DST_DIR := $(TGT_DIR)/h/crypto
INTERNAL_DST_DIR := $(TGT_DIR)/h/internal

generate-headers:
	cd $(WIND_HOME)/vxworks-6.9/target/src/openssl/openssl_src/ && $(MAKE) -f ossl350.prepare.mak
	@if [ -d "$(OPENSSL_DST_DIR)" ]; then \
		rm -r $(OPENSSL_DST_DIR);\
	fi
	@if [ -d "$(CRYPTO_DST_DIR)" ]; then \
		rm -r $(CRYPTO_DST_DIR);\
	fi
	@if [ -d "$(INTERNAL_DST_DIR)" ]; then \
		rm -r $(INTERNAL_DST_DIR);\
	fi

