diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/civetweb/resources/Makefile.in-duktape | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/civetweb/resources/Makefile.in-duktape')
-rw-r--r-- | src/civetweb/resources/Makefile.in-duktape | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/civetweb/resources/Makefile.in-duktape b/src/civetweb/resources/Makefile.in-duktape new file mode 100644 index 00000000..3a53f2e3 --- /dev/null +++ b/src/civetweb/resources/Makefile.in-duktape @@ -0,0 +1,77 @@ +# +# Copyright (c) 2015-2017 the Civetweb developers +# +# License http://opensource.org/licenses/mit-license.php MIT License +# + +ifndef WITH_DUKTAPE + $(error WITH_DUKTAPE is not defined) +endif + +# Duktape default version is 1.5.2 (105) +WITH_DUKTAPE_VERSION ?= 105 +DUKTAPE_VERSION_KNOWN = 0 + +# Select src and header according to the Duktape version +ifeq ($(WITH_DUKTAPE_VERSION), 105) + $(info Duktape: Using version 1.5.2) + DUKTAPE_DIR = src/third_party/duktape-1.5.2/src + DUKTAPE_SHARED_LIB_FLAG = -lduktape1.5 + DUKTAPE_CFLAGS = -DDUKTAPE_VERSION_MAKEFILE=105 + DUKTAPE_VERSION_KNOWN = 1 +endif + +ifeq ($(WITH_DUKTAPE_VERSION), 108) + $(info Duktape: Using version 1.8.0) + DUKTAPE_DIR = src/third_party/duktape-1.8.0/src + DUKTAPE_SHARED_LIB_FLAG = -lduktape1.8 + DUKTAPE_CFLAGS = -DDUKTAPE_VERSION_MAKEFILE=108 + DUKTAPE_VERSION_KNOWN = 1 +endif + +ifeq ($(WITH_DUKTAPE_VERSION), 201) + $(info Duktape: Using version 2.1.1) + DUKTAPE_DIR = src/third_party/duktape-2.1.1/src + DUKTAPE_SHARED_LIB_FLAG = -lduktape2.1 + DUKTAPE_CFLAGS = -DDUKTAPE_VERSION_MAKEFILE=201 + DUKTAPE_VERSION_KNOWN = 1 +endif + +ifneq ($(DUKTAPE_VERSION_KNOWN), 1) + $(error Duktape: Unknwon version - $(WITH_DUKTAPE_VERSION)) +endif + + +# Add flags for all Duktape versions +DUKTAPE_CFLAGS += -I$(DUKTAPE_DIR) -DUSE_DUKTAPE + +ifneq ($(TARGET_OS),WIN32) +# DUKTAPE_CFLAGS += +endif + +ifdef WITH_DUKTAPE_SHARED + + DUKTAPE_SOURCE_FILES = + + $(info Duktape: using dynamic linking) + +else + + DUKTAPE_SOURCE_FILES = duktape.c + +ifeq ($(WITH_DUKTAPE_VERSION), 104) +# DUKTAPE_SOURCE_FILES += ... TODO ... +endif + + $(info Duktape: using static library) + +endif + +DUKTAPE_SOURCES = $(addprefix $(DUKTAPE_DIR)/, $(DUKTAPE_SOURCE_FILES)) +DUKTAPE_OBJECTS = $(DUKTAPE_SOURCES:.c=.o) + +OBJECTS += $(DUKTAPE_OBJECTS) +CFLAGS += $(DUKTAPE_CFLAGS) +SOURCE_DIRS = $(DUKTAPE_DIR) +BUILD_DIRS += $(BUILD_DIR)/$(DUKTAPE_DIR) + |