aboutsummaryrefslogtreecommitdiffhomepage
path: root/gen/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'gen/Makefile')
-rw-r--r--gen/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/gen/Makefile b/gen/Makefile
index 53d1a94..53cc3e9 100644
--- a/gen/Makefile
+++ b/gen/Makefile
@@ -1,7 +1,7 @@
TARGET=../xbyak/xbyak_mnemonic.h
BIN=sortline gen_code gen_avx512
CFLAGS=-I../ -O2 -DXBYAK_NO_OP_NAMES -Wall -Wextra -Wno-missing-field-initializers
-all: $(TARGET)
+all: $(TARGET) ../CMakeLists.txt
sortline: sortline.cpp
$(CXX) $(CFLAGS) $< -o $@
gen_code: gen_code.cpp ../xbyak/xbyak.h avx_type.hpp
@@ -22,5 +22,9 @@ $(TARGET): $(BIN)
echo "#endif" >> $@
echo "#endif" >> $@
+VER=$(shell head -n 1 ../xbyak/xbyak_mnemonic.h|grep -o "[0-9.]*")
+../CMakeLists.txt: $(TARGET)
+ sed -i -e 's/CXX VERSION [0-9.]*/CXX VERSION $(VER)/' ../CMakeLists.txt
+
clean:
$(RM) $(BIN) $(TARGET)