forked from arminbiere/cadical
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.in
30 lines (30 loc) · 1.02 KB
/
makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This is a 'makefile.in' template with '@CXX@' and '@CXXFLAGS@' parameters.
# Relies on 'gmake' for dependency handling and '$(shell ...)' commands.
.SUFFIXES: .cpp .o
MAKEFLAGS=-j
OBJ=$(shell ls ../src/*.cpp|sed -e '/main/d' -e '/app/d' -e 's,../src/,,' -e 's,.cpp$$,.o,g')
SRC=$(shell ls ../src/*.cpp ../src/*.hpp)
BUILD=../$(shell pwd|sed -e 's,.*/,,')
CXX=@CXX@
CXXFLAGS=@CXXFLAGS@
COMPILE=$(CXX) $(CXXFLAGS) -I$(BUILD)
all: cadical libcadical.a
%.o: ../src/%.cpp
$(COMPILE) -c $<
-include dependencies
cadical: main.o app.o libcadical.a makefile
$(COMPILE) -o $@ main.o app.o -L. -lcadical
libcadical.a: $(OBJ) makefile
rm -f $@
ar rc $@ $(OBJ)
ranlib $@
config.hpp: ../scripts/make-config-header.sh $(SRC) makefile
../scripts/make-config-header.sh > $@
dependencies: config.hpp ../src/*.cpp makefile
$(COMPILE) -MM ../src/*.cpp|sed -e 's,:,: makefile,' >$@
clean:
rm -f *.o *.a cadical makefile config.hpp dependencies
rm -f *.gcda *.gcno *.gcov gmon.out
test: all
CADICALBUILD="$(BUILD)" make -C ../test
.PHONY: all clean test