]> Nishi Git Mirror - odl.git/commitdiff
uname -m
author諏訪子 <suwako@076.moe>
Wed, 1 May 2024 04:47:02 +0000 (13:47 +0900)
committer諏訪子 <suwako@076.moe>
Wed, 1 May 2024 04:47:02 +0000 (13:47 +0900)
Makefile

index fc9ee40b75cb5a73ff1b4ed79ec254dd14a6da7f..3a1451f45ea251a276a630d780ac22d2892474a6 100644 (file)
--- 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