2
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/mkproof synced 2024-05-23 21:26:08 +02:00

Fix cross-compilation on some systems

Some Linux distributions (e.g. NixOS, where this issue was spotted) don't provide an unprefixed ar when cross-compiling. This PR aims to fix this.

See[NixOS/nixpkgs#67490](https://github.com/NixOS/nixpkgs/pull/67490) for information on where did it start.
This commit is contained in:
Vika 2019-08-26 14:05:22 +03:00 committed by GitHub
parent 62358ba212
commit cd1c1d8d20
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,6 +123,8 @@ ifdef LINKED_LIB_EXT
LINKED_LIB_SH := lib$(LIB_NAME).$(LINKED_LIB_EXT)
endif
# Some systems don't provide an unprefixed ar when cross-compiling.
AR=ar
LIBRARIES = $(LIB_SH) $(LIB_ST)
HEADERS = include/argon2.h
@ -182,7 +184,7 @@ $(LIB_SH): $(SRC)
$(CC) $(CFLAGS) $(LIB_CFLAGS) $(LDFLAGS) $(SO_LDFLAGS) $^ -o $@
$(LIB_ST): $(OBJ)
ar rcs $@ $^
$(AR) rcs $@ $^
.PHONY: clean
clean: