mirror of
https://github.com/nasa/trick.git
synced 2024-12-20 21:53:10 +00:00
Added all flag to disable mongoose
This commit is contained in:
parent
fb41b4cec8
commit
9981865c3e
13
Makefile
13
Makefile
@ -149,15 +149,18 @@ ifeq ($(USE_JAVA), 1)
|
||||
all: java
|
||||
endif
|
||||
|
||||
ifeq ($(TRICK_MONGOOSE), 1)
|
||||
all: webserver
|
||||
icg_sim_serv: ${TRICK_HOME}/include/mongoose/mongoose.h
|
||||
ICG: ${TRICK_HOME}/include/mongoose/mongoose.h
|
||||
endif
|
||||
#ifeq ($(TRICK_MONGOOSE), 1)
|
||||
#all: webserver
|
||||
#icg_sim_serv: ${TRICK_HOME}/include/mongoose/mongoose.h
|
||||
#ICG: ${TRICK_HOME}/include/mongoose/mongoose.h
|
||||
#endif
|
||||
|
||||
ifeq ($(TRICK_CIVET), 1)
|
||||
all: civetweb
|
||||
icg_sim_serv: civetweb
|
||||
ICG: civetweb
|
||||
endif
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# 1.1 Build Trick-core
|
||||
no_dp: $(TRICK_LIB) $(TRICK_SWIG_LIB)
|
||||
|
@ -346,20 +346,32 @@ AC_ARG_ENABLE([offline],
|
||||
AC_SUBST([TRICK_OFFLINE])
|
||||
|
||||
# If offline is specified, set some compilation flags
|
||||
AC_ARG_ENABLE([mongoose],
|
||||
AS_HELP_STRING([--enable-mongoose], [Compile Trick with webserver capabilites.]),
|
||||
AS_IF([test "x$enable_mongoose" = xyes],
|
||||
#AC_ARG_ENABLE([mongoose],
|
||||
# AS_HELP_STRING([--enable-mongoose], [Compile Trick with webserver capabilites.]),
|
||||
# AS_IF([test "x$enable_mongoose" = xyes],
|
||||
# [
|
||||
# TRICK_MONGOOSE="1"
|
||||
# AC_MSG_WARN($(tput setaf 1) --enable-mongoose Mongoose is released under GPLv2 and Trick is \
|
||||
#released under NASA Open Source Agreement 1.3. Distribution must comply with \
|
||||
#these agreements$(tput sgr0))
|
||||
# ],
|
||||
# [TRICK_MONGOOSE="0"]
|
||||
# ),
|
||||
# [TRICK_MONGOOSE="0"]
|
||||
#)
|
||||
#AC_SUBST([TRICK_MONGOOSE])
|
||||
|
||||
AC_ARG_ENABLE([civet],
|
||||
AS_HELP_STRING([--disable-civet], [Compilel Trick without webserver capabilities.]),
|
||||
AS_IF([test "x$disable_mongoose" = xyes]),
|
||||
[
|
||||
TRICK_MONGOOSE="1"
|
||||
AC_MSG_WARN($(tput setaf 1) --enable-mongoose Mongoose is released under GPLv2 and Trick is \
|
||||
released under NASA Open Source Agreement 1.3. Distribution must comply with \
|
||||
these agreements$(tput sgr0))
|
||||
],
|
||||
[TRICK_MONGOOSE="0"]
|
||||
TRICK_CIVET="0"
|
||||
],
|
||||
[TRICK_CIVET="1"]
|
||||
),
|
||||
[TRICK_MONGOOSE="0"]
|
||||
[TRICK_CIVET="0"]
|
||||
)
|
||||
AC_SUBST([TRICK_MONGOOSE])
|
||||
AC_SUBST([TRICK_CIVET])
|
||||
|
||||
# If offline is specified, set some compilation flags
|
||||
AC_ARG_ENABLE([offline],
|
||||
|
@ -4,6 +4,8 @@ PURPOSE: (Represent the state and initial conditions of an http server.)
|
||||
#ifndef CIVET_SERVER_H
|
||||
#define CIVET_SERVER_H
|
||||
|
||||
#ifdef USE_CIVET
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
#include <pthread.h>
|
||||
@ -78,3 +80,4 @@ struct Data {
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
@ -4,6 +4,7 @@ PURPOSE: (Represent Websocket connection.)
|
||||
#ifndef WEB_SOCKET_SESSION_HH
|
||||
#define WEB_SOCKET_SESSION_HH
|
||||
|
||||
#ifdef USE_CIVET
|
||||
#include <string>
|
||||
#ifndef SWIG
|
||||
#include "civet/CivetServer.h"
|
||||
@ -27,3 +28,4 @@ class WebSocketSession {
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
@ -99,11 +99,14 @@
|
||||
#include "trick/lqueue.h"
|
||||
#include "trick/lstack.h"
|
||||
|
||||
#ifdef USE_MONGOOSE
|
||||
#include "trick/WebServer.hh"
|
||||
#include "trick/WebSocketSession.hh"
|
||||
#endif
|
||||
//#ifdef USE_MONGOOSE
|
||||
//#include "trick/WebServer.hh"
|
||||
//#include "trick/WebSocketSession.hh"
|
||||
//#endif
|
||||
|
||||
#ifdef USE_CIVET
|
||||
#include "trick/MyCivetServer.hh"
|
||||
#include "trick/WebSocketSession.hh"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -171,15 +171,19 @@ ifneq ($(GSL_HOME),)
|
||||
TRICK_SYSTEM_CXXFLAGS += -D_HAVE_GSL
|
||||
endif
|
||||
|
||||
ifeq (${TRICK_MONGOOSE},1)
|
||||
TRICK_LIBS += -ltrickHTTP ${TRICK_LIB_DIR}/libmongoose.a
|
||||
TRICK_SWIG_FLAGS += -DUSE_MONGOOSE
|
||||
TRICK_SYSTEM_CXXFLAGS += -DUSE_MONGOOSE
|
||||
TRICK_ICG_EXCLUDE += :${TRICK_HOME}/include/mongoose
|
||||
endif
|
||||
#ifeq (${TRICK_MONGOOSE},1)
|
||||
# TRICK_LIBS += -ltrickHTTP ${TRICK_LIB_DIR}/libmongoose.a
|
||||
# TRICK_SWIG_FLAGS += -DUSE_MONGOOSE
|
||||
# TRICK_SYSTEM_CXXFLAGS += -DUSE_MONGOOSE
|
||||
# TRICK_ICG_EXCLUDE += :${TRICK_HOME}/include/mongoose
|
||||
#endif
|
||||
|
||||
TRICK_LIBS += ${TRICK_LIB_DIR}/libcivetweb.a ${TRICK_LIB_DIR}/libtrickCivet.a
|
||||
TRICK_ICG_EXCLUDE += ${TRICK_HOME}/include/civet
|
||||
ifeq (${TRICK_MONGOOSE},1)
|
||||
TRICK_LIBS += ${TRICK_LIB_DIR}/libcivetweb.a ${TRICK_LIB_DIR}/libtrickCivet.a
|
||||
TRICK_SWIG_FLAGS += DUSE_CIVET
|
||||
TRICK_SYSTEM_CXXFLAGS += -DUSE_CIVET
|
||||
TRICK_ICG_EXCLUDE += ${TRICK_HOME}/include/civet
|
||||
endif
|
||||
|
||||
# We pipe the output of compiler through tee. If the user wanted gcc color, make sure they get it.
|
||||
ifdef GCC_COLORS
|
||||
|
@ -18,6 +18,7 @@ JAVAC = @JAVA_CC@
|
||||
|
||||
TRICK_OFFLINE = @TRICK_OFFLINE@
|
||||
TRICK_MONGOOSE = @TRICK_MONGOOSE@
|
||||
TRICK_CIVET = @TRICK_CIVET@
|
||||
|
||||
USE_X_WINDOWS = @USE_X_WINDOWS@
|
||||
|
||||
|
@ -52,8 +52,12 @@ ifeq ($(USE_ER7_UTILS_CHECKPOINTHELPER), 1)
|
||||
SWIG_DEFS += -DUSE_ER7_UTILS_CHECKPOINTHELPER
|
||||
endif
|
||||
|
||||
ifeq ($(TRICK_MONGOOSE), 1)
|
||||
SWIG_DEFS += -DUSE_MONGOOSE
|
||||
#ifeq ($(TRICK_MONGOOSE), 1)
|
||||
#SWIG_DEFS += -DUSE_MONGOOSE
|
||||
#endif
|
||||
|
||||
ifeq ($(TRICK_CIVET), 1)
|
||||
SWIG_DEFS += -DUSE_CIVET
|
||||
endif
|
||||
|
||||
default: $(SWIG_OBJECT_FILES) $(TRICK_LIB) $(TEST_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user