...

Text file src/github.com/chenzhuoyu/base64x/Makefile

Documentation: github.com/chenzhuoyu/base64x

     1.PHONY: all clean
     2
     3CFLAGS := -mavx
     4CFLAGS += -mavx2
     5CFLAGS += -mno-bmi
     6CFLAGS += -mno-red-zone
     7CFLAGS += -fno-asynchronous-unwind-tables
     8CFLAGS += -fno-stack-protector
     9CFLAGS += -fno-exceptions
    10CFLAGS += -fno-builtin
    11CFLAGS += -fno-rtti
    12CFLAGS += -nostdlib
    13CFLAGS += -O3
    14
    15NATIVE_ASM := $(wildcard native/*.S)
    16NATIVE_SRC := $(wildcard native/*.h)
    17NATIVE_SRC += $(wildcard native/*.c)
    18
    19all: native_amd64.s
    20
    21clean:
    22	rm -vf native_text_amd64.go native_subr_amd64.go output/*.s
    23
    24native_amd64.s: ${NATIVE_SRC} ${NATIVE_ASM} native_amd64.go
    25	mkdir -p output
    26	clang ${CFLAGS} -S -o output/native.s native/native.c
    27	python3 tools/asm2asm/asm2asm.py -r native_amd64.go output/native.s ${NATIVE_ASM}
    28	awk '{gsub(/Text__native_entry__/, "text__native_entry__")}1' native_text_amd64.go > native_text_amd64.go.tmp && mv native_text_amd64.go.tmp native_text_amd64.go
    29	awk '{gsub(/Funcs/, "funcs")}1' native_subr_amd64.go > native_subr_amd64.go.tmp && mv native_subr_amd64.go.tmp native_subr_amd64.go

View as plain text