From d06f504deb34bc49f7935f386508217270e1bcb7 Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 1 Sep 2017 14:20:21 +1000 Subject: Only use lua-compat-5.3 if running < 5.3 --- src/GNUmakefile | 14 ++++++++++++-- src/openssl.c | 2 ++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/GNUmakefile b/src/GNUmakefile index af6cbf9..dc8af36 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -25,7 +25,7 @@ LIBS_$(d) = $(ALL_LIBS) # # C O M P I L A T I O N R U L E S # -OBJS_$(d) = openssl.o ../vendor/compat53/c-api/compat-5.3.o +OBJS_$(d) = openssl.o $(d)/config.h: $(abspath $(d)/..)/config.h $(CP) $< $@ @@ -35,10 +35,20 @@ define BUILD_$(d) $$(d)/$(1)/openssl.so: $$(addprefix $$(d)/$(1)/, $$(OBJS_$(d))) $$(CC) -o $$@ $$^ $$(SOFLAGS_$$(abspath $$(@D)/..)) $$(LDFLAGS_$$(abspath $$(@D)/..)) $$(LIBS_$$(abspath $$(@D)/..)) -$$(d)/$(1)/%.o: $$(d)/%.c $$(d)/../vendor/compat53/c-api/compat-5.3.h $$(d)/config.h +$$(d)/$(1)/%.o: $$(d)/%.c $$(d)/config.h $$(MKDIR) -p $$(@D) $$(CC) $$(CFLAGS_$$( #include +#if LUA_VERSION_NUM < 503 #include "../vendor/compat53/c-api/compat-5.3.h" +#endif #define GNUC_2VER(M, m, p) (((M) * 10000) + ((m) * 100) + (p)) #define GNUC_PREREQ(M, m, p) (__GNUC__ > 0 && GNUC_2VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) >= GNUC_2VER((M), (m), (p))) -- cgit v1.2.3-59-g8ed1b