###############################################################################
#Copyright (C) 2024 CIX Technology, Inc.
#All Rights Reserved.
#
#The code contained herein is licensed under the GNU General Public
#License. You may obtain a copy of the GNU General Public License
#Version 2 or later at the following locations:
#
#http://www.opensource.org/licenses/gpl-license.html
#http://www.gnu.org/copyleft/gpl.html
###############################################################################
#
#    @file   Makefile
#
#    @brief  configuration file to compile the memtool application.
#
###############################################################################
#Revision History:
#Author                  Date      Description of Changes
#------------------  ------------  ----------------------
# Cagent Zhang        6/10/2024   Initial version
#
###############################################################################
#Portability: Indicate if this module is portable to other compilers
#             or platforms.
#             If not, indicate specific reasons why is it not portable.
#
###############################################################################


SUBDIRS=memtool-2018.03.0
TARGET=memtool

all:
	@cd $(SUBDIRS); autoreconf -fi; ./configure --host=$(basename "${CROSS_COMPILE}"); make

install:
	@echo "***********************************************" ; \
	echo "** INSTALL : $(TARGET) " ;\
	echo "***********************************************"
	-ln -f $(SUBDIRS)/$(TARGET) ../../../bin/

clean:
	@cd $(SUBDIRS); test -f "Makefile" && make clean && make distclean; cd .
