mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 20:33:55 +00:00
samples/c_interface/cplusplus_calls_mercury/Mmakefile:
samples/c_interface/mercury_calls_cplusplus/Mmakefile:
samples/c_interface/simpler_cplusplus_calls_mercury/Mmakefile:
As above.
43 lines
1.2 KiB
Plaintext
43 lines
1.2 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
# vim: ts=8 sw=8 noexpandtab
|
|
#-----------------------------------------------------------------------------#
|
|
# This source file is hereby placed in the public domain. -fjh (the author).
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
MAIN_TARGET=all
|
|
|
|
depend: cpp_main.depend
|
|
all: cpp_main
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
.SUFFIXES: .cc
|
|
.cc.o:
|
|
$(CXX) $(CXXFLAGS) -c $<
|
|
|
|
CXX=$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS)
|
|
|
|
# Pass `-g' to the C compiler and linker, so we can use a debugger (e.g. gdb).
|
|
CXXFLAGS=-g
|
|
MGNUCFLAGS=-g
|
|
|
|
# Tell the Mercury linker that the Mercury stuff we're building should
|
|
# not define the C function main().
|
|
MLFLAGS=--no-main -g
|
|
|
|
# Tell the Mercury linker to link with main.o.
|
|
MLOBJS=main.o
|
|
MLLIBS=-lstdc++
|
|
|
|
MCFLAGS-cpp_main=--no-warn-nothing-exported
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
main.o: mercury_lib.mh
|
|
|
|
# make sure that `mmake clean' removes main.o
|
|
clean_local:
|
|
rm -f main.o
|
|
|
|
#-----------------------------------------------------------------------------#
|