diff --git a/Makefile b/Makefile index 695e0a27..31960177 100644 --- a/Makefile +++ b/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) diff --git a/autoconf/configure.ac b/autoconf/configure.ac index b5a5a262..25df7c2a 100644 --- a/autoconf/configure.ac +++ b/autoconf/configure.ac @@ -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], diff --git a/include/trick/MyCivetServer.hh b/include/trick/MyCivetServer.hh index 669b39e0..b2c215a4 100644 --- a/include/trick/MyCivetServer.hh +++ b/include/trick/MyCivetServer.hh @@ -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 #include #include @@ -78,3 +80,4 @@ struct Data { }; #endif +#endif \ No newline at end of file diff --git a/include/trick/WebSocketSession.hh b/include/trick/WebSocketSession.hh index d86725bf..a7f6ea80 100644 --- a/include/trick/WebSocketSession.hh +++ b/include/trick/WebSocketSession.hh @@ -4,6 +4,7 @@ PURPOSE: (Represent Websocket connection.) #ifndef WEB_SOCKET_SESSION_HH #define WEB_SOCKET_SESSION_HH +#ifdef USE_CIVET #include #ifndef SWIG #include "civet/CivetServer.h" @@ -27,3 +28,4 @@ class WebSocketSession { }; #endif +#endif \ No newline at end of file diff --git a/include/trick/files_to_ICG.hh b/include/trick/files_to_ICG.hh index ed426ee3..badcbf5a 100644 --- a/include/trick/files_to_ICG.hh +++ b/include/trick/files_to_ICG.hh @@ -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 diff --git a/share/trick/makefiles/Makefile.common b/share/trick/makefiles/Makefile.common index 87db03e9..c44c3552 100644 --- a/share/trick/makefiles/Makefile.common +++ b/share/trick/makefiles/Makefile.common @@ -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 diff --git a/share/trick/makefiles/config_user.mk.in b/share/trick/makefiles/config_user.mk.in index 2fe8610b..619146e2 100644 --- a/share/trick/makefiles/config_user.mk.in +++ b/share/trick/makefiles/config_user.mk.in @@ -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@ diff --git a/trick_source/trick_swig/Makefile b/trick_source/trick_swig/Makefile index 2a5b239c..44ba5435 100644 --- a/trick_source/trick_swig/Makefile +++ b/trick_source/trick_swig/Makefile @@ -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)