-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (37 loc) · 1.2 KB
/
Makefile
File metadata and controls
45 lines (37 loc) · 1.2 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# BooleanInference Makefile
# This Makefile handles building the CaDiCaL dependency and the custom library
.PHONY: all submodule cadical mylib clean clean-all help
# Default target
all: mylib
# Help message
help:
@echo "Available targets:"
@echo " all - Build everything (default)"
@echo " submodule - Initialize and update git submodules"
@echo " cadical - Build the CaDiCaL library"
@echo " mylib - Build the custom CaDiCaL wrapper library"
@echo " clean - Clean the custom library"
@echo " clean-all - Clean everything including CaDiCaL build"
# Update git submodules
submodule:
git submodule update --init --recursive
# Build CaDiCaL
cadical: submodule
@echo "Building CaDiCaL..."
cd deps/cadical && \
make clean || true && \
export CFLAGS="-fPIC" CXXFLAGS="-fPIC" && \
./configure && \
$(MAKE) -j4 CFLAGS="-fPIC" CXXFLAGS="-fPIC"
# Build the custom library (depends on CaDiCaL)
mylib: cadical
@echo "Building custom CaDiCaL wrapper..."
$(MAKE) -C src/cdcl
# Clean custom library only
clean:
$(MAKE) -C src/cdcl clean
# Clean everything
clean-all: clean
@echo "Cleaning CaDiCaL build..."
cd deps/cadical && make clean 2>/dev/null || true
rm -rf deps/cadical/build