Added CivetWeb.sm

This commit is contained in:
Caleb Herpin 2021-07-01 19:38:30 -05:00
parent ae93889c00
commit e9cd688c3f
4 changed files with 31 additions and 2 deletions

View File

@ -0,0 +1,27 @@
/************************TRICK HEADER*************************
PURPOSE:
(Trick HTTP Server)
LIBRARY DEPENDENCIES:
(
(/home/cherpin/git/trick/trick_source/web/HttpServer/src/CivetServer.cpp)
)
*************************************************************/
##include "trick/CivetServer.hh"
class MyCivetServerSimObject : public Trick::SimObject {
public:
MyCivetServer server ;
MyCivetServerSimObject() {
("default_data") server.default_data() ;
("initialization") server.init() ;
("freeze") server.http_top_of_frame() ;
("top_of_frame") server.http_top_of_frame() ;
("shutdown") server.shutdown() ;
}
};
MyCivetServerSimObject web;

View File

@ -10,6 +10,7 @@ LIBRARY DEPENDENCIES:
#include "sim_objects/default_trick_sys.sm"
// #include "sim_objects/WebServer.sm"
#include "sim_objects/CivetServer.sm"
##include "cannon/gravity/include/cannon_numeric.h"
class CannonSimObject : public Trick::SimObject {

View File

@ -1,2 +1,3 @@
TRICK_CFLAGS += -I../models
TRICK_CXXFLAGS += -I../models
TRICK_USER_LINK_LIBS += ${TRICK_HOME}/lib/libtrickCivet.a ${TRICK_HOME}/lib/libcivetweb.a

View File

@ -30,12 +30,12 @@ TRICK_HTTP_OBJS = \
## MODEL TARGETS ##
#############################################################################
all: ${TRICK_LIB_DIR}/libtrickHTTP.a
all: ${TRICK_LIB_DIR}/libtrickCivet.a
$(TRICK_HTTP_OBJS): $(OBJDIR)/%.o : src/%.cpp | $(OBJDIR)
$(CPP) $(CPPFLAGS) ${TRICK_SYSTEM_CXXFLAGS} ${INCLUDE_DIRS} -c $< -o $@
${TRICK_LIB_DIR}/libtrickHTTP.a: ${TRICK_HTTP_OBJS}
${TRICK_LIB_DIR}/libtrickCivet.a: ${TRICK_HTTP_OBJS}
ar crs $@ ${TRICK_HTTP_OBJS}
# ---------------------------------------------------------------------------