2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-12-12 13:03:16 +01:00
|
|
|
#
|
|
|
|
# mongoose
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-12-12 13:03:16 +01:00
|
|
|
|
2014-08-05 22:47:07 +02:00
|
|
|
MONGOOSE_VERSION = 5.4
|
2014-05-12 21:31:26 +02:00
|
|
|
MONGOOSE_SITE = $(call github,cesanta,mongoose,$(MONGOOSE_VERSION))
|
|
|
|
MONGOOSE_LICENSE = GPLv2
|
2013-05-03 12:35:18 +02:00
|
|
|
MONGOOSE_LICENSE_FILES = LICENSE
|
2014-05-27 11:31:43 +02:00
|
|
|
MONGOOSE_INSTALL_STAGING = YES
|
2012-12-12 13:03:16 +01:00
|
|
|
|
2013-05-02 22:59:23 +02:00
|
|
|
MONGOOSE_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS)
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
|
|
MONGOOSE_DEPENDENCIES += openssl
|
|
|
|
# directly linked
|
2014-05-12 21:31:26 +02:00
|
|
|
MONGOOSE_CFLAGS += -DNS_ENABLE_SSL -lssl -lcrypto -lz
|
2013-05-02 22:59:23 +02:00
|
|
|
endif
|
2012-12-12 13:03:16 +01:00
|
|
|
|
|
|
|
define MONGOOSE_BUILD_CMDS
|
2014-08-07 19:20:16 +02:00
|
|
|
$(TARGET_CC) $(@D)/examples/server.c $(@D)/mongoose.c -I$(@D) \
|
2014-08-05 22:47:07 +02:00
|
|
|
-o $(@D)/examples/server $(MONGOOSE_CFLAGS) -pthread -ldl
|
2014-05-27 11:31:43 +02:00
|
|
|
$(TARGET_CC) -c $(@D)/mongoose.c $(MONGOOSE_CFLAGS) -o $(@D)/mongoose.o
|
|
|
|
$(TARGET_AR) rcs $(@D)/libmongoose.a $(@D)/mongoose.o
|
2012-12-12 13:03:16 +01:00
|
|
|
endef
|
|
|
|
|
|
|
|
define MONGOOSE_INSTALL_TARGET_CMDS
|
2014-05-27 11:31:43 +02:00
|
|
|
$(INSTALL) -D -m 755 $(@D)/examples/server \
|
|
|
|
$(TARGET_DIR)/usr/sbin/mongoose
|
2012-12-12 13:03:16 +01:00
|
|
|
$(INSTALL) -D -m 755 package/mongoose/S85mongoose \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S85mongoose
|
|
|
|
endef
|
|
|
|
|
2014-05-27 11:31:43 +02:00
|
|
|
define MONGOOSE_INSTALL_STAGING_CMDS
|
|
|
|
$(INSTALL) -D -m 644 $(@D)/libmongoose.a \
|
|
|
|
$(STAGING_DIR)/usr/lib/libmongoose.a
|
|
|
|
$(INSTALL) -D -m 644 $(@D)/mongoose.h \
|
|
|
|
$(STAGING_DIR)/usr/include/mongoose.h
|
|
|
|
endef
|
|
|
|
|
2012-12-12 13:03:16 +01:00
|
|
|
$(eval $(generic-package))
|