mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 01:13:30 +00:00
Estimated hours taken: 0.75 Mmakefile: */Mmakefile: */*/Mmakefile: */*/*/Mmakefile: Use `clean_local' instead of `clean' and `realclean_local' instead of `realclean' where appropriate. This is necessary now that `realclean' does not depend on `clean'.
64 lines
1.4 KiB
Plaintext
64 lines
1.4 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 1997-1999 The University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU Library General
|
|
# Public License - see the file COPYING.LIB in the Mercury distribution.
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
MAIN_TARGET = all
|
|
|
|
# We need to use a grade with trailing
|
|
GRADEFLAGS += --use-trail
|
|
|
|
MGNUCFLAGS= -I..
|
|
|
|
# Link in the reference library from ..
|
|
MCFLAGS += -I.. $(EXTRA_MCFLAGS)
|
|
MLFLAGS += -R`pwd`/.. -L.. $(EXTRA_MLFLAGS)
|
|
MLLIBS = -lglobal $(EXTRA_MLLIBS)
|
|
VPATH = ..:$(MMAKE_VPATH)
|
|
C2INITARGS = ../global.init
|
|
|
|
# We need the following to use shared libraries on Linux
|
|
#MGNUCFLAGS += -DPIC_REG
|
|
#MLFLAGS += --shared
|
|
|
|
#MLFLAGS += --static
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
PROGS = ref_test
|
|
|
|
DEPENDS = $(PROGS:%=%.depend)
|
|
CS = $(PROGS:%=%.c)
|
|
RESS = $(PROGS:%=%.res)
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
$(PROGS): ../libglobal.a
|
|
|
|
%.out: %
|
|
./$< > $@ 2>&1;
|
|
|
|
%.res: %.exp %.out
|
|
diff -c $*.exp $*.out > $@
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
.PHONY: depend
|
|
depend: $(DEPENDS)
|
|
|
|
.PHONY: all
|
|
all: $(PROGS)
|
|
|
|
.PHONY: check
|
|
check: $(RESS)
|
|
|
|
.PHONY: cs
|
|
cs: $(CS)
|
|
|
|
.PHONY: clean_local
|
|
clean_local:
|
|
rm -f *.out *.res
|
|
|
|
#-----------------------------------------------------------------------------#
|