diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2022-10-11 11:49:32 +0200 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2022-10-11 11:49:32 +0200 |
commit | e0ee3dad789078dc38f0d0da195cadc1c8ac0479 (patch) | |
tree | 68f260a0ad01d672160be329593af56fa13c2191 /Makefile | |
parent | 64a771aa19423d96bb72251eb209d50eb1f13f08 (diff) | |
download | code-e0ee3dad789078dc38f0d0da195cadc1c8ac0479.tar.gz code-e0ee3dad789078dc38f0d0da195cadc1c8ac0479.tar.bz2 code-e0ee3dad789078dc38f0d0da195cadc1c8ac0479.zip |
Fixed the helper files.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 19 |
1 files changed, 6 insertions, 13 deletions
@@ -4,24 +4,17 @@ 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))
+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
CXX = clang++
LD = ld.lld
LIBS := -lrt
-all: excitation order uniform free_energy
-
-free_energy: free_energy.cpp $(BLOSSOM_DIR)/blossom5.o rbmp.hpp
- $(CXX) $(CFLAGS) $(BLOSSOM_DIR)/blossom5.o free_energy.cpp -o $@
-
-uniform: uniform.cpp $(BLOSSOM_DIR)/blossom5.o rbmp.hpp
- $(CXX) $(CFLAGS) $(BLOSSOM_DIR)/blossom5.o uniform.cpp -o $@
-
-order: order.cpp $(BLOSSOM_DIR)/blossom5.o rbmp.hpp
- $(CXX) $(CFLAGS) $(BLOSSOM_DIR)/blossom5.o order.cpp -o $@
+all: $(TARGETS)
-excitation: excitation.cpp $(BLOSSOM_DIR)/blossom5.o
- $(CXX) $(CFLAGS) $(BLOSSOM_DIR)/blossom5.o excitation.cpp -o $@
+$(TARGETS): %: %.cpp $(BLOSSOM_DIR)/blossom5.o rbmp.hpp
+ $(CXX) $(CFLAGS) $(BLOSSOM_DIR)/blossom5.o $@.cpp -o $@
$(BLOSSOM_DIR)/blossom5.o: ${BLOSSOM_OBJS}
$(LD) -r -o $@ ${BLOSSOM_OBJS}
@@ -30,4 +23,4 @@ $(BLOSSOM_DIR)/blossom5.o: ${BLOSSOM_OBJS} $(CXX) $(CFLAGS) $< -c -o $@
clean:
- rm -f ${BLOSSOM_OBJS} $(BLOSSOM_DIR)/blossom5.o rbmp
+ rm -f ${BLOSSOM_OBJS} $(BLOSSOM_DIR)/blossom5.o $(TARGETS)
|