aboutsummaryrefslogtreecommitdiffstats
path: root/src/GNUmakefile
diff options
context:
space:
mode:
authorLibravatarLibravatar daurnimator <quae@daurnimator.com> 2017-09-01 14:20:21 +1000
committerLibravatarLibravatar daurnimator <quae@daurnimator.com> 2017-09-01 14:20:21 +1000
commitd06f504deb34bc49f7935f386508217270e1bcb7 (patch)
tree9bbc7982afcdff2878b3ecab9886e7211f2fe8e1 /src/GNUmakefile
parent068543e777a2a8cb2fea33e9569bfdd0593f7946 (diff)
downloadluaossl-d06f504deb34bc49f7935f386508217270e1bcb7.tar.gz
luaossl-d06f504deb34bc49f7935f386508217270e1bcb7.tar.bz2
luaossl-d06f504deb34bc49f7935f386508217270e1bcb7.zip
Only use lua-compat-5.3 if running < 5.3
Diffstat (limited to 'src/GNUmakefile')
-rw-r--r--src/GNUmakefile14
1 files changed, 12 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_$$(<D)) $$(ALL_LUA$(subst .,,$(1))_CPPFLAGS) $$(CPPFLAGS_$$(<D)) -c -o $$@ $$<
+ifneq ($(1), 5.3)
+$$(d)/$(1)/compat53.o: $$(d)/../vendor/compat53/c-api/compat-5.3.c $$(d)/../vendor/compat53/c-api/compat-5.3.h $$(d)/config.h
+ $$(MKDIR) -p $$(@D)
+ $$(CC) $$(CFLAGS_$$(<D)) $$(ALL_LUA$(subst .,,$(1))_CPPFLAGS) $$(CPPFLAGS_$$(<D)) -c -o $$@ $$<
+
+$$(d)/$(1)/%.o: $$(d)/../vendor/compat53/c-api/compat-5.3.h
+
+$$(d)/$(1)/openssl.so: $$(d)/$(1)/compat53.o
+endif
+
.SECONDARY: liblua$(1)-openssl openssl$(1) openssl
liblua$(1)-openssl openssl$(1) openssl: $$(d)/$(1)/openssl.so