Files
mercury/samples/c_interface/mercury_calls_cplusplus/Mmakefile
Julien Fischer 5f6981c7de Delete ancient workaround for g++ 2.7.
samples/c_interface/cplusplus_calls_mercury/Mmakefile:
samples/c_interface/mercury_calls_cplusplus/Mmakefile:
samples/c_interface/simpler_cplusplus_calls_mercury/Mmakefile:
     As above.
2023-03-11 14:21:10 +11:00

44 lines
1.3 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: mercury_main.depend
all: mercury_main
#-----------------------------------------------------------------------------#
.SUFFIXES: .cc
.cc.o:
$(CXX) $(CXXFLAGS) -c $<
CXX=$(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS)
CXXFLAGS=
# We need to link in the C++ standard library.
MLLIBS = -lstdc++
# Another alternative, rather than explicitly linking in -lstdc++ like we
# do above, would be to use g++ rather than gcc to do the linking, like
# this:
#ML = MERCURY_C_COMPILER=g++ \
# MERCURY_LINK_SHARED_OBJ="g++ -shared" \
# ml
#-----------------------------------------------------------------------------#
# tell the Mercury linker to link in cpp_main.o
MLOBJS=cpp_main.o
# tell mmake that it needs to make cpp_main.o before it can make mercury_main
mercury_main: cpp_main.o
# make sure that `mmake clean' removes cpp_main.o
clean_local:
rm -f cpp_main.o
#-----------------------------------------------------------------------------#