qt5base-lts/util/x86simdgen/Makefile
Thiago Macieira 718dae8e0b x86simdgen: update the Makefile to include the copyright in the .cpp
Drive-by include "DO NOT EDIT" in both files.

Change-Id: Ib5ce7a497e034ebabb2cfffd1762bf1d4ce737eb
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-05-26 16:22:15 -07:00

23 lines
843 B
Makefile

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)
sed '/-- implementation start --/,/-- implementation end --/d' $^ | \
sed 's!3rdparty/x86simd_generate\.pl!util/x86simdgen/README.md!' > $@
$(TARGETDIR)/$(TARGETCPP): $(TARGETHEADER) header
(sed '/^$$/q' header; \
echo '#include "$(TARGETHEADER)"'; \
sed '1,/-- implementation start --/d;/-- implementation end --/,$$d' $<) > $@
clean:
-$(RM) $(TARGETHEADER)