You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
51 lines
1.2 KiB
10 years ago
|
# OpenBSD signify - portable version
|
||
|
# mancha <mancha1@zoho.com>
|
||
|
|
||
|
prefix=/usr
|
||
|
bindir=${prefix}/bin
|
||
|
mandir=${prefix}/man
|
||
|
|
||
|
DESTDIR=
|
||
|
|
||
|
CC=gcc
|
||
|
AR=ar
|
||
|
INSTALL=/usr/bin/install -c
|
||
|
|
||
10 years ago
|
CFLAGS=-O2 -D_FORTIFY_SOURCE=2 -fPIC -ftrapv -fPIE -fstack-protector-all \
|
||
10 years ago
|
-Wno-attributes -Wno-unused-result -Ibsd-compat -I.
|
||
|
|
||
|
TARGET = signify
|
||
|
|
||
10 years ago
|
SIGNIFY_STATIC_LIB = libsignify_static.a
|
||
|
SIGNIFY_SHARED_LIB = libsignify_shared.so
|
||
10 years ago
|
|
||
10 years ago
|
SIGNIFY_OBJS = fe25519.o sc25519.o smult_curve25519_ref.o \
|
||
10 years ago
|
mod_ed25519.o mod_ge25519.o crypto_api.o base64.o bcrypt_pbkdf.o \
|
||
|
explicit_bzero.o arc4random.o timingsafe_bcmp.o sha2.o blowfish.o \
|
||
|
readpassphrase.o strlcpy.o helpers.o ohash.o
|
||
|
|
||
|
all: $(TARGET) $(TARGET_LIB)
|
||
|
|
||
10 years ago
|
%.o: %.c
|
||
|
$(CC) $(CFLAGS) -c $<
|
||
10 years ago
|
|
||
10 years ago
|
$(SIGNIFY_STATIC_LIB): $(SIGNIFY_OBJS)
|
||
|
$(AR) crs $@ $(SIGNIFY_OBJS)
|
||
|
|
||
|
$(SIGNIFY_SHARED_LIB): $(SIGNIFY_STATIC_LIB)
|
||
|
$(CC) -shared -o $@ $(SIGNIFY_STATIC_LIB)
|
||
|
|
||
|
$(TARGET): $(SIGNIFY_STATIC_LIB) $(SIGNIFY_STATIC_LIB)
|
||
|
$(CC) $(CFLAGS) -o $(TARGET) signify.c $(SIGNIFY_STATIC_LIB)
|
||
10 years ago
|
|
||
|
clean:
|
||
10 years ago
|
rm -f *.o *.so *.a signify
|
||
10 years ago
|
|
||
|
install:
|
||
|
$(INSTALL) -c -D -m 0755 signify $(DESTDIR)/$(bindir)/signify
|
||
|
$(INSTALL) -c -D -m 644 signify.1 $(DESTDIR)/$(mandir)/man1/signify.1
|
||
|
|
||
|
uninstall:
|
||
|
@rm -f $(DESTDIR)/$(bindir)/signify
|
||
|
@rm -f $(DESTDIR)/$(mandir)/man1/signify.1
|