mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +00:00
Building the POSIX binding using mmc --make by default and just have mmake
forward its work to that. Using mmc --make means things like library grade
exclusions will work properly.
Exclude non-C grades from the grade set in which to install the POSIX binding.
Shift a POSIX binding sample into the samples subdirectory.
extras/posix/Makefile:
extras/posix/Mercury.options:
Build the POSIX binding using mmc --make.
extras/posix/Mmakefile:
Redirect mmake to use the normal Makefile.
extras/posix/hello.m:
Shift this file into the samples subdirectory.
extras/samples/Makefile:
Set up things to build the samples against a libposix in the
parent directory.
extras/samples/Mmakefile:
Delete this file.
17 lines
365 B
Makefile
17 lines
365 B
Makefile
DEMOS = mdprof_cgid hello
|
|
MMC = mmc
|
|
|
|
# The following target builds the demos and links them against the posix
|
|
# library in the parent directory in situ.
|
|
#
|
|
all:
|
|
$(MMC) --search-lib-files-dir .. \
|
|
--init-file ../posix.init \
|
|
--link-object ../libposix.a \
|
|
--make $(DEMOS)
|
|
|
|
.PHONY: realclean
|
|
realclean:
|
|
$(MMC) --make $(DEMOS:%=%.realclean)
|
|
/bin/rm -rf Mercury
|