2022-01-28 19:31:37 +00:00
|
|
|
GENERATOR = 3rdparty/x86simd_generate.pl
|
|
|
|
TARGETDIR = ../../src/corelib/global/
|
|
|
|
TARGETCPP = qsimd_x86.cpp
|
|
|
|
TARGETHEADER = qsimd_x86_p.h
|
|
|
|
|
|
|
|
CONF_FILES = 3rdparty/simd-intel.conf
|
|
|
|
# We don't currently use any feature from simd-amd.conf
|
|
|
|
# CONF_FILES += 3rdparty/simd-amd.conf
|
|
|
|
|
|
|
|
all: $(TARGETDIR)/$(TARGETHEADER) $(TARGETDIR)/$(TARGETCPP)
|
|
|
|
$(TARGETHEADER): $(CONF_FILES) | $(GENERATOR)
|
|
|
|
cat $^ | perl $(GENERATOR) /dev/stdin $@ > $@
|
|
|
|
$(TARGETDIR)/$(TARGETHEADER): header $(TARGETHEADER)
|
2022-02-25 11:35:13 +00:00
|
|
|
sed '/-- implementation start --/,/-- implementation end --/d' $^ | \
|
|
|
|
sed 's!3rdparty/x86simd_generate\.pl!util/x86simdgen/README.md!' > $@
|
2022-01-28 19:31:37 +00:00
|
|
|
$(TARGETDIR)/$(TARGETCPP): $(TARGETHEADER) header
|
2023-05-26 16:41:54 +00:00
|
|
|
(sed '/^$$/q' header; \
|
2022-02-25 11:35:13 +00:00
|
|
|
echo '#include "$(TARGETHEADER)"'; \
|
|
|
|
sed '1,/-- implementation start --/d;/-- implementation end --/,$$d' $<) > $@
|
2022-01-28 19:31:37 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
-$(RM) $(TARGETHEADER)
|