Commits

Shlomi Fish  committed 233a380

Adapt Makefile.gnu.

  • Participants
  • Parent commits 152ebc4
  • Branches spqjea_priority_queue_by_peter_sanders__trial

Comments (0)

Files changed (1)

File fc-solve/source/Makefile.gnu

 
 ifeq ($(COMPILER),gcc)
 	CC = gcc
+	CPPC = g++
 	GCC_COMPAT := 1
 	CFLAGS += -Werror=implicit-function-declaration
 else ifeq ($(COMPILER),icc)
           scans.o             \
           split_cmd_line.o    \
           state.o             \
+		  pqueue.o
 
 
 #>>>OBJECTS.END
 %.o: %.c
 	$(CC) $(INIT_CFLAGS) -c $(CFLAGS) -o $@ $< $(END_OFLAGS)
 
+%.o: %.cpp
+	$(CPPC) $(INIT_CFLAGS) -c $(CFLAGS) -o $@ $< $(END_OFLAGS)
+
 STATIC_LIB_BASE = fcs
 STATIC_LIB = lib$(STATIC_LIB_BASE).a
 
 LIB_LINK_POST := -l$(STATIC_LIB_BASE)
 
 fc-solve: main.o $(STATIC_LIB)
-	$(CC) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $< $(LIB_LINK_POST) $(END_LFLAGS)
+	$(CPPC) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $< $(LIB_LINK_POST) $(END_LFLAGS)
 
 freecell-solver-range-parallel-solve: test_multi_parallel.o $(STATIC_LIB)
-	$(CC) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $< $(LIB_LINK_POST) $(END_LFLAGS)
+	$(CPPC) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $< $(LIB_LINK_POST) $(END_LFLAGS)
 
 freecell-solver-multi-thread-solve: threaded_range_solver.o $(STATIC_LIB)
-	$(CC) $(TCMALLOC_LINK) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $< $(LIB_LINK_POST) -lpthread $(END_LFLAGS) 
+	$(CPPC) $(TCMALLOC_LINK) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $< $(LIB_LINK_POST) -lpthread $(END_LFLAGS) 
 
 FC_PRO_OBJS = fc_pro_range_solver.o fc_pro_iface.o
 
 freecell-solver-fc-pro-range-solve: $(FC_PRO_OBJS) $(STATIC_LIB)
-	$(CC) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $(FC_PRO_OBJS) $(LIB_LINK_POST) $(END_LFLAGS)
+	$(CPPC) $(LFLAGS) -o $@ $(LIB_LINK_PRE) $(FC_PRO_OBJS) $(LIB_LINK_POST) $(END_LFLAGS)
 
 FCC_SOLVER_OBJS = fcc_solver.o libavl/avl.o app_str.o card.o meta_alloc.o state.o