Skip to content

Commit 1d81306

Browse files
authored
Merge pull request diffblue#2015 from tautschnig/fix-smt2_solver-clean
smt2_solver.{o,d} should be removed by "make clean"
2 parents 48e427a + 392144d commit 1d81306

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/common

+8-5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ ifeq ($(filter-out Unix MinGW OSX OSX_Universal FreeBSD,$(BUILD_ENV_)),)
2424
# Linux-ish
2525
LIBEXT = .a
2626
OBJEXT = .o
27+
DEPEXT = .d
2728
ifeq ($(BUILD_ENV_),MinGW)
2829
EXEEXT = .exe
2930
else
@@ -96,6 +97,7 @@ else ifeq ($(BUILD_ENV_),Cygwin)
9697
# use these for Cygwin:
9798
LIBEXT = .a
9899
OBJEXT = .o
100+
DEPEXT = .d
99101
EXEEXT = .exe
100102
CFLAGS ?= -Wall -O2
101103
CXXFLAGS ?= -Wall -O2
@@ -128,6 +130,7 @@ else ifeq ($(BUILD_ENV_),MSVC)
128130
# use these for Visual Studio:
129131
LIBEXT = .lib
130132
OBJEXT = .obj
133+
DEPEXT = .dep
131134
EXEEXT = .exe
132135
CFLAGS ?= /W3 /O2 /GF
133136
CXXFLAGS ?= /W3 /D_CRT_SECURE_NO_WARNINGS /O2 /GF
@@ -208,7 +211,7 @@ CP_CXXFLAGS += $(CXXFLAGS) $(INCLUDES)
208211
OBJ += $(patsubst %.cpp, %$(OBJEXT), $(filter %.cpp, $(SRC)))
209212
OBJ += $(patsubst %.cc, %$(OBJEXT), $(filter %.cc, $(SRC)))
210213

211-
.SUFFIXES: .cc .d .cpp
214+
.SUFFIXES: .cc $(DEPEXT) .cpp
212215

213216
%.o:%.cpp
214217
$(CXX) -c $(CP_CXXFLAGS) -o $@ $<
@@ -231,9 +234,9 @@ OBJ += $(patsubst %.cc, %$(OBJEXT), $(filter %.cc, $(SRC)))
231234

232235
clean:
233236
$(RM) $(patsubst %.cpp, %$(OBJEXT), $(filter %.cpp, $(SRC))) \
234-
$(patsubst %.cpp, %.d, $(filter %.cpp, $(SRC))) \
237+
$(patsubst %.cpp, %$(DEPEXT), $(filter %.cpp, $(SRC))) \
235238
$(patsubst %.cc, %$(OBJEXT), $(filter %.cc, $(SRC))) \
236-
$(patsubst %.cc, %.d, $(filter %.cc, $(SRC))) \
239+
$(patsubst %.cc, %$(DEPEXT), $(filter %.cc, $(SRC))) \
237240
$(CLEANFILES)
238241

239242
.PHONY: first_target clean all
@@ -250,8 +253,8 @@ sources: Makefile
250253
# include .depend
251254
# endif
252255

253-
D_FILES1 = $(SRC:.c=.d)
254-
D_FILES = $(D_FILES1:.cpp=.d)
256+
D_FILES1 = $(SRC:.c=$(DEPEXT))
257+
D_FILES = $(D_FILES1:.cpp=$(DEPEXT))
255258

256259
-include $(D_FILES)
257260

src/solvers/Makefile

+2-5
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ INCLUDES += -I .. \
217217
$(SMVSAT_INCLUDE) $(SQUOLEM2_INC) $(CUDD_INCLUDE) $(GLUCOSE_INCLUDE) \
218218
$(PRECOSAT_INCLUDE) $(PICOSAT_INCLUDE) $(LINGELING_INCLUDE)
219219

220-
CLEANFILES = solvers$(LIBEXT) smt2_solver$(EXEEXT)
220+
CLEANFILES = solvers$(LIBEXT) \
221+
smt2_solver$(EXEEXT) smt2/smt2_solver$(OBJEXT) smt2/smt2_solver$(DEPEXT)
221222

222223
all: solvers$(LIBEXT) smt2_solver$(EXEEXT)
223224

@@ -229,10 +230,6 @@ ifneq ($(CUDD),)
229230
endif
230231
endif
231232

232-
# extra dependencies
233-
234-
-include $(SRC:.cpp=.d)
235-
236233
SOLVER_LIB = $(CHAFF_LIB) $(BOOLEFORCE_LIB) $(MINISAT_LIB) \
237234
$(MINISAT2_LIB) $(SMVSAT_LIB) $(SQUOLEM2_LIB) $(CUDD_LIB) \
238235
$(PRECOSAT_LIB) $(PICOSAT_LIB) $(LINGELING_LIB) $(GLUCOSE_LIB)

0 commit comments

Comments
 (0)