#-----------------------------------------------------------------------------#
# vim: ts=8 sw=8 noexpandtab ft=make
#-----------------------------------------------------------------------------#
# Copyright (C) 1997-1998, 2000, 2004, 2010 The University of Melbourne.
# Copyright (C) 2015, 2018, 2025 The Mercury team.
# This file is distributed under the terms specified in COPYING.LIB.
#-----------------------------------------------------------------------------#

GRADEFLAGS += --use-trail

# enable C debugging
MGNUCFLAGS = -g
MLFLAGS = -g

# We need this to use shared libraries on Linux
ML = ml --mercury-libs shared

# The Mmake.params file can be used to override definitions in this file
-include ../Mmake.params

MAIN_TARGET = libtrailed_update

MCFLAGS-trailed_update=--no-warn-nothing-exported

.PHONY: depend
depend: trailed_update.depend
	cd samples && mmake $(MMAKEFLAGS) depend
	cd tests && mmake $(MMAKEFLAGS) depend

.PHONY: check
check: libtrailed_update
	cd samples && mmake $(MMAKEFLAGS) check
	cd tests && mmake $(MMAKEFLAGS) check

.PHONY: clean
clean:
	cd samples && mmake $(MMAKEFLAGS) clean
	cd tests && mmake $(MMAKEFLAGS) clean

.PHONY: realclean
realclean:
	cd samples && mmake $(MMAKEFLAGS) realclean
	cd tests && mmake $(MMAKEFLAGS) realclean

#-----------------------------------------------------------------------------#
