Skip to content

Commit

Permalink
Demand C++17 standard
Browse files Browse the repository at this point in the history
  • Loading branch information
JanWielemaker committed Jul 25, 2024
1 parent 18c3a52 commit d6992f5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ CDSLIB=$(LIBCDS)/.libs
SOBJ= $(SWIPL_MODULE_DIR)/hdt4pl.$(SWIPL_MODULE_EXT)
NPROC:=$(shell expr $$(nproc) + 1)
MAKE_J=-j$(NPROC)
CFLAGS=$(SWIPL_CFLAGS) -I$(LIBHDT)/include -g
COFLAGS=-O2
CXXFLAGS=$(SWIPL_CFLAGS) -I$(LIBHDT)/include -std=c++17 $(COFLAGS)
# This doesn't work because the *.so files get picked first:
# LIBS= -L$(HDTLIB) -L$(CDSLIB) -lhdt -lcds
# Instead, we copy the *.a files into the same directory as $(OBJ)
Expand Down Expand Up @@ -37,10 +38,10 @@ c/libcds.a: $(CDSLIB)/libcds.a

$(SOBJ): $(OBJ) $(OBJ2)
mkdir -p $(SWIPL_MODULE_DIR)
$(CXX) $(ARCH) $(SWIPL_MODULE_LDFLAGS) -o $@ $< $(LIBS) $(SWIPL_MODULE_LIB) -lserd-0
$(CXX) $(SWIPL_MODULE_LDFLAGS) -o $@ $< $(LIBS) $(SWIPL_MODULE_LIB) -lserd-0

c/hdt4pl.o: c/hdt4pl.cpp $(HDTLIB)/libhdt.a $(CDSLIB)/libcds.a
$(CXX) $(ARCH) $(CFLAGS) -c -o $@ c/hdt4pl.cpp
$(CXX) $(CXXFLAGS) -c -o $@ c/hdt4pl.cpp

$(HDTLIB)/libhdt.a $(HDTLIB)/libcds.a: $(HDTHOME)/Makefile FORCE
set -x -e && $(MAKE) -C $(HDTHOME) $(MAKE_J)
Expand Down

0 comments on commit d6992f5

Please sign in to comment.