pegh/Makefile

39 lines
738 B
Makefile
Raw Normal View History

# should compile with clang like:
# CC=clang CFLAGS=-Weverything make clean all
# and gcc like:
# CC=gcc make clean all
CFLAGS += -Wall -Wextra -Werror -std=c89 -pedantic \
-Wstrict-prototypes -Wold-style-definition -Wconversion \
2019-12-30 02:55:42 -05:00
-Wno-missing-prototypes -Wno-missing-noreturn -Wno-format \
-O3
ifdef PEGH_OPENSSL
ifdef PEGH_LIBSODIUM
# both libsodium and openssl
CFLAGS += -DPEGH_LIBSODIUM -DPEGH_OPENSSL
2019-12-30 02:55:42 -05:00
LDLIBS += -lsodium -lcrypto
else
# only openssl
CFLAGS += -DPEGH_OPENSSL
2019-12-30 02:55:42 -05:00
LDLIBS += -lcrypto
endif
else
ifdef PEGH_LIBSODIUM
# only libsodium
CFLAGS += -DPEGH_LIBSODIUM
2019-12-30 02:55:42 -05:00
LDLIBS += -lsodium
else
# default of only openssl
CFLAGS += -DPEGH_OPENSSL
2019-12-30 02:55:42 -05:00
LDLIBS += -lcrypto
endif
endif
all : pegh
2019-12-25 09:45:47 -05:00
clean :
rm -f pegh