Use different executable names for C and C++ examples

Trying to create the same "runme" executable for both C and C++ examples
could result in errors when using parallel make, as one of the targets
could fail to write to the file being currently executed.

Using separate names works around this problem.
This commit is contained in:
Vadim Zeitlin 2021-11-25 01:55:46 +01:00
commit f42b0eaa71

View file

@ -1374,10 +1374,10 @@ c_cpp: $(SRCDIR_SRCS)
$(CXX_LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(CLIBPREFIX)$(TARGET)$(C_SO)
c_compile_c: $(SRCDIR)$(RUNME).c
$(COMPILETOOL) $(CC) $(CFLAGS) -o $(RUNME) -I. -I.. $< -L. -l$(TARGET)
$(COMPILETOOL) $(CC) $(CFLAGS) -o $(RUNME)_$(RUNME_EXT) -I. -I.. $< -L. -l$(TARGET)
c_compile_cxx: $(SRCDIR)$(RUNME).cxx
$(COMPILETOOL) $(CXX) $(CXXFLAGS) -o $(RUNME) -I. -I.. $< -L. -l$(TARGET)
$(COMPILETOOL) $(CXX) $(CXXFLAGS) -o $(RUNME)_$(RUNME_EXT) -I. -I.. $< -L. -l$(TARGET)
$(eval c_compile: c_compile_$(RUNME_EXT))
@ -1397,7 +1397,7 @@ c_syntax_check_cxx:
# -----------------------------------------------------------------
c_run: c_compile
env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) ./$(RUNME) $(RUNPIPE)
env LD_LIBRARY_PATH=$$PWD $(RUNTOOL) ./$(RUNME)_$(RUNME_EXT) $(RUNPIPE)
# -----------------------------------------------------------------
# Version display
@ -1414,7 +1414,7 @@ c_clean:
rm -f *_wrap.[ch] *_wrap.cxx
rm -f core @EXTRA_CLEAN@
rm -f *.@OBJEXT@ *@SO@
rm -f $(RUNME)
rm -f $(RUNME)_c $(RUNME)_cxx
##################################################################
##### SCILAB ######