1 ################################################################################
5 ################################################################################
8 MONGOOSE_SITE
= $(call github
,cesanta
,mongoose
,$(MONGOOSE_VERSION
))
9 MONGOOSE_LICENSE
= GPLv2
10 MONGOOSE_LICENSE_FILES
= LICENSE
11 MONGOOSE_INSTALL_STAGING
= YES
13 MONGOOSE_CFLAGS
= $(TARGET_CFLAGS
) $(TARGET_LDFLAGS
) -DMONGOOSE_NO_DL
15 ifeq ($(BR2_PACKAGE_OPENSSL
),y
)
16 MONGOOSE_DEPENDENCIES
+= openssl
18 MONGOOSE_CFLAGS
+= -DNS_ENABLE_SSL
-lssl
-lcrypto
-lz
21 define MONGOOSE_BUILD_CMDS
22 $(TARGET_CC
) $(@D
)/examples
/web_server
/web_server.c
$(@D
)/mongoose.c \
23 -I
$(@D
) -o
$(@D
)/examples
/web_server
/web_server \
24 $(MONGOOSE_CFLAGS
) -pthread
25 $(TARGET_CC
) -c
$(@D
)/mongoose.c
$(MONGOOSE_CFLAGS
) -o
$(@D
)/mongoose.o
26 $(TARGET_AR
) rcs
$(@D
)/libmongoose.a
$(@D
)/mongoose.o
29 define MONGOOSE_INSTALL_TARGET_CMDS
30 $(INSTALL
) -D
-m
755 $(@D
)/examples
/web_server
/web_server \
31 $(TARGET_DIR
)/usr
/sbin
/mongoose
34 define MONGOOSE_INSTALL_INIT_SYSV
35 $(INSTALL
) -D
-m
755 package
/mongoose
/S85mongoose \
36 $(TARGET_DIR
)/etc
/init.d
/S85mongoose
39 define MONGOOSE_INSTALL_INIT_SYSTEMD
40 $(INSTALL
) -D
-m
644 package
/mongoose
/mongoose.service \
41 $(TARGET_DIR
)/usr
/lib
/systemd
/system
/mongoose.service
42 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
43 ln
-sf ..
/..
/..
/..
/usr
/lib
/systemd
/system
/mongoose.service \
44 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/mongoose.service
47 define MONGOOSE_INSTALL_STAGING_CMDS
48 $(INSTALL
) -D
-m
644 $(@D
)/libmongoose.a \
49 $(STAGING_DIR
)/usr
/lib
/libmongoose.a
50 $(INSTALL
) -D
-m
644 $(@D
)/mongoose.h \
51 $(STAGING_DIR
)/usr
/include/mongoose.h
54 $(eval
$(generic-package
))