Makefile.mess (1155B)
1 # Let Luarocks point us to the right headers 2 ifdef LUA_INCDIR 3 CFLAGS += -I$(LUA_INCDIR) 4 endif 5 6 # OS detection 7 uname ?= $(shell uname -s) 8 9 ifneq ($(uname),Darwin) 10 LDFLAGS += -shared 11 else 12 LDFLAGS += -bundle -undefined dynamic_lookup 13 endif 14 15 ifneq ($(uname),OpenBSD) 16 # This is more or less what libressl does 17 # See http://openbsd.cs.toronto.edu/cgi-bin/cvsweb/src/lib/libssl/src/crypto/mem_clr.c?rev=1.4&content-type=text/x-cvsweb-markup 18 CFLAGS += -DOPENSSL_cleanse=explicit_bzero 19 20 CFLAGS += -Icompat/include 21 22 SRCS += compat/safebfuns.c 23 SRCS += compat/bcrypt/bcrypt.c 24 SRCS += compat/bcrypt/blowfish.c 25 26 ifneq ($(uname),NetBSD) 27 SRCS += compat/arc4random/arc4random.c 28 endif 29 30 ifeq ($(uname),Linux) 31 SRCS += compat/sha/sha512.c 32 SRCS += compat/getentropy/getentropy_linux.c 33 LDFLAGS += -lrt 34 endif 35 36 ifeq ($(uname),SunOS) 37 SRCS += compat/sha/sha512.c 38 SRCS += compat/getentropy/getentropy_solaris.c 39 endif 40 41 ifeq ($(uname),Darwin) 42 SRCS += compat/getentropy/getentropy_osx.c 43 endif 44 45 ifeq ($(uname),FreeBSD) 46 SRCS += compat/getentropy/getentropy_freebsd.c 47 endif 48 endif 49 50 compat/safebfuns.o: compat/safebfuns.c 51 $(CC) $(CFLAGS) -O0 -c -o $@ $^