aboutsummaryrefslogtreecommitdiffhomepage
path: root/gen
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <[email protected]>2017-07-12 15:15:22 +0900
committerMITSUNARI Shigeo <[email protected]>2017-07-12 15:15:22 +0900
commit33b25646f773b9dbe01e64ccce7b5746dfc97d2c (patch)
treec01669a4e70515a19a7b6dc3a644682ac01b6d02 /gen
parent95770157c8f04f6804ea66ebbf411b052a61b733 (diff)
downloadxbyak-33b25646f773b9dbe01e64ccce7b5746dfc97d2c.tar.gz
xbyak-33b25646f773b9dbe01e64ccce7b5746dfc97d2c.zip
add Makefile for gen
Diffstat (limited to 'gen')
-rw-r--r--gen/Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/gen/Makefile b/gen/Makefile
new file mode 100644
index 0000000..ff611f8
--- /dev/null
+++ b/gen/Makefile
@@ -0,0 +1,26 @@
+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)
+sortline: sortline.cpp
+ $(CXX) $(CFLAGS) $< -o $@
+gen_code: gen_code.cpp
+ $(CXX) $(CFLAGS) $< -o $@
+gen_avx512: gen_avx512.cpp
+ $(CXX) $(CFLAGS) $< -o $@
+
+$(TARGET): $(BIN)
+ ./gen_code | ./sortline > $@
+ echo "#ifdef XBYAK_ENABLE_OMITTED_OPERAND" >> $@
+ ./gen_code omit | ./sortline >> $@
+ echo "#endif" >>$@
+ ./gen_code fixed >> $@
+ echo "#ifndef XBYAK_DISABLE_AVX512" >> $@
+ ./gen_avx512 | ./sortline >> $@
+ echo "#ifdef XBYAK64" >> $@
+ ./gen_avx512 64 | ./sortline >> $@
+ echo "#endif" >> $@
+ echo "#endif" >> $@
+
+clean:
+ $(RM) $(BIN) $(TARGET)