]> Nishi Git Mirror - sp.git/commitdiff
uname -m v1.3.0 1/head
author諏訪子 <suwako@076.moe>
Tue, 30 Apr 2024 12:07:41 +0000 (21:07 +0900)
committer諏訪子 <suwako@076.moe>
Tue, 30 Apr 2024 12:07:41 +0000 (21:07 +0900)
Makefile

index 44c987f03635c3af90631aad71d8754a9d05db0f..a9db0b77b4c4c5c13537bfe03a91f6e1b605b1e0 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/;//"
@@ -41,27 +42,27 @@ dist: clean
 
 release-openbsd:
        mkdir -p release
-       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-openbsd-amd64 ${FILES} \
+       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-openbsd-${UNAME_M} ${FILES} \
                -static -lgpgme -lcrypto -lc -lassuan -lgpg-error -lintl -liconv
-       strip release/${NAME}-${VERSION}-openbsd-amd64
+       strip release/${NAME}-${VERSION}-openbsd-${UNAME_M}
 
 release-freebsd:
        mkdir -p release
-       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-freebsd-amd64 ${FILES} \
+       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-freebsd-${UNAME_M} ${FILES} \
                -static -lgpgme -lcrypto -lc -lassuan -lgpg-error -lthr -lintl
-       strip release/${NAME}-${VERSION}-freebsd-amd64
+       strip release/${NAME}-${VERSION}-freebsd-${UNAME_M}
 
 release-netbsd:
        mkdir -p release
-       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-netbsd-amd64 ${FILES} \
+       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-netbsd-${UNAME_M} ${FILES} \
                -static -lgpgme -lcrypto -lcrypt -lc -lassuan -lgpg-error -lintl
-       strip release/${NAME}-${VERSION}-netbsd-amd64
+       strip release/${NAME}-${VERSION}-netbsd-${UNAME_M}
 
 release-linux:
        mkdir -p release
-       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-linux-amd64 ${FILES} \
+       ${CC} ${CFLAGS} -o release/${NAME}-${VERSION}-linux-${UNAME_M} ${FILES} \
                -static -lgpgme -lcrypto -lc -lassuan -lgpg-error
-       strip release/${NAME}-${VERSION}-linux-amd64
+       strip release/${NAME}-${VERSION}-linux-${UNAME_M}
 
 install: all
        mkdir -p ${DESTDIR}${PREFIX}/bin