UNAME_S!=uname -s
+UNAME_M!=uname -m
NAME!=cat main.c | grep "const char\* sofname" | awk '{print $$5}' | \
sed "s/\"//g" | sed "s/;//"
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