summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2022-10-11 14:25:11 +0200
committerJaron Kent-Dobias <jaron@kent-dobias.com>2022-10-11 14:25:11 +0200
commit6308773c0b6b745d49d20dc2afd6ab7ec63cb996 (patch)
treea60fc6397eed84b5286bd22952d7331489e70b15 /Makefile
parent2083cff9581c3953ebdfa9a9ff951016c0ffc8b5 (diff)
downloadcode-6308773c0b6b745d49d20dc2afd6ab7ec63cb996.tar.gz
code-6308773c0b6b745d49d20dc2afd6ab7ec63cb996.tar.bz2
code-6308773c0b6b745d49d20dc2afd6ab7ec63cb996.zip
Refactoring.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 85296fb..3caf84c 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,7 @@ BLOSSOM_DIRS := $(BLOSSOM_DIR) $(BLOSSOM_DIR)/MinCost $(BLOSSOM_DIR)/GEOM
BLOSSOM_SOURCES := $(filter-out $(BLOSSOM_DIR)/example.cpp, $(foreach dir, $(BLOSSOM_DIRS), $(wildcard $(dir)/*.cpp)))
BLOSSOM_OBJS := $(patsubst %.cpp, %.o, $(BLOSSOM_SOURCES))
+OBJS := aztec.o
TARGETS := excitation order uniform free_energy
CFLAGS := -std=c++20 -stdlib=libc++ -flto -fopenmp -O3 -Os -march=native -mtune=native -D_NDEBUG -DPERFECT_MATCHING_DOUBLE
@@ -13,8 +14,11 @@ LIBS := -lrt
all: $(TARGETS)
-$(TARGETS): %: %.cpp $(BLOSSOM_DIR)/blossom5.o rbmp.hpp
- $(CXX) $(CFLAGS) $(BLOSSOM_DIR)/blossom5.o $@.cpp -o $@
+$(TARGETS): %: %.cpp $(BLOSSOM_DIR)/blossom5.o ${OBJS} aztec.hpp
+ $(CXX) $(CFLAGS) $(BLOSSOM_DIR)/blossom5.o ${OBJS} $@.cpp -o $@
+
+$(OBJS): aztec.cpp aztec.hpp
+ $(CXX) $(CFLAGS) $< -c -o $@
$(BLOSSOM_DIR)/blossom5.o: ${BLOSSOM_OBJS}
$(LD) -r -o $@ ${BLOSSOM_OBJS}