From 93054ca89c2d1292e2a2b13756a29d1efc688673 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Wed, 1 May 2024 13:47:02 +0900 Subject: [PATCH] uname -m --- Makefile | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index fc9ee40..3a1451f 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ UNAME_S!=uname -s +UNAME_M!=uname -m NAME!=cat main.c | grep "const char\* sofname" | awk '{print $$5}' | \ sed "s/\"//g" | sed "s/;//" @@ -33,43 +34,40 @@ all: clean: rm -f ${NAME} -release-openbsd-i386: - mkdir -p release/bin - ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-openbsd-i386 ${FILES} ${LDFLAGS} \ - -static -lcurl -lc -lnghttp3 -lngtcp2_crypto_quictls -lngtcp2 -lssl \ - -lcrypto -lnghttp2 -lz -lpthread - strip release/bin/${NAME}-${VERSION}-openbsd-i386 - release-openbsd: mkdir -p release/bin - ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-openbsd-amd64 ${FILES} ${LDFLAGS} \ + ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-openbsd-${UNAME_M} \ + ${FILES} ${LDFLAGS} \ -static -lcurl -lc -lnghttp3 -lngtcp2_crypto_quictls -lngtcp2 -lssl \ -lcrypto -lnghttp2 -lz -lpthread - strip release/bin/${NAME}-${VERSION}-openbsd-amd64 + strip release/bin/${NAME}-${VERSION}-openbsd-${UNAME_M} release-netbsd: mkdir -p release/bin - ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-netbsd-amd64 ${FILES} ${LDFLAGS} \ + ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-netbsd-${UNAME_M} \ + ${FILES} ${LDFLAGS} \ -static -lcurl -lnghttp2 -lc -lidn2 -lunistring -lgssapi -lkrb5 -lhx509 -lintl \ -lssl -lcrypto -lcrypt -lasn1 -lcom_err -lroken -lutil -lwind -lheimbase \ -lheimntlm -lz -lpthread - strip release/bin/${NAME}-${VERSION}-netbsd-amd64 + strip release/bin/${NAME}-${VERSION}-netbsd-${UNAME_M} release-freebsd: mkdir -p release/bin - ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-freebsd-amd64 ${FILES} ${LDFLAGS} \ + ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-freebsd-${UNAME_M} \ + ${FILES} ${LDFLAGS} \ -static -lcurl -lnghttp2 -lssh2 -lpsl -lssl -lheimntlm \ -lhx509 -lcom_err -lcrypto -lasn1 -lwind -lheimbase \ -lroken -lcrypt -lz -lkrb5 -lgssapi -lgssapi_krb5 -lthr \ -lidn2 -lunistring -lprivateheimipcc - strip release/bin/${NAME}-${VERSION}-freebsd-amd64 + strip release/bin/${NAME}-${VERSION}-freebsd-${UNAME_M} release-linux: mkdir -p release/bin - ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-linux-amd64 ${FILES} ${LDFLAGS} \ + ${CC} ${CFLAGS} -o release/bin/${NAME}-${VERSION}-linux-${UNAME_M} \ + ${FILES} ${LDFLAGS} \ -static -lcurl -lc -lnghttp2 -lidn2 -lssh2 -lpsl -lssl -lcrypto -lzstd -lz \ -lunistring - strip release/bin/${NAME}-${VERSION}-linux-amd64 + strip release/bin/${NAME}-${VERSION}-linux-${UNAME_M} dist: mkdir -p ${NAME}-${VERSION} release/src -- 2.43.0