Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build the POSIX binding using mmc --make.
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.
- Loading branch information
Showing
6 changed files
with
67 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#-----------------------------------------------------------------------------# | ||
# vim: ts=8 sw=8 noexpandtab | ||
#-----------------------------------------------------------------------------# | ||
# Copyright (C) 2011 The University of Melbourne. | ||
# Copyright (C) 2015, 2018-2019 The Mercury team. | ||
# This file is distributed under the terms specified in COPYING.LIB. | ||
#-----------------------------------------------------------------------------# | ||
|
||
# Build the posix library using mmc --make. | ||
|
||
TARGET = posix | ||
MMC = mmc | ||
|
||
.PHONY: build | ||
build: posix_workarounds.o | ||
$(MMC) --make lib$(TARGET) | ||
|
||
.PHONY: install | ||
install: posix_workarounds.o | ||
$(MMC) --make lib$(TARGET).install | ||
|
||
posix_workarounds.o: posix_workarounds.c | ||
|
||
.PHONY: realclean | ||
realclean: | ||
cd samples && $(MAKE) realclean | ||
$(MMC) --make $(TARGET).realclean | ||
/bin/rm -f posix_workarounds.o | ||
/bin/rm -rf Mercury |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
MCFLAGS = \ | ||
--libgrades-exclude java \ | ||
--libgrades-exclude csharp \ | ||
--libgrades-exclude erlang \ | ||
--link-object posix_workarounds.o \ | ||
--extra-library-header posix_workarounds.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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 |
This file was deleted.
Oops, something went wrong.
File renamed without changes.