From 6308773c0b6b745d49d20dc2afd6ab7ec63cb996 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 11 Oct 2022 14:25:11 +0200 Subject: Refactoring. --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Makefile') 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} -- cgit v1.2.3-70-g09d2