Don't compile and link HTTP server by default Ref #756

This commit is contained in:
Penn, John M 047828115 2019-04-24 18:29:50 -05:00
parent b029fae692
commit cebfc174ae
4 changed files with 30 additions and 22 deletions

View File

@ -5,26 +5,15 @@ LIBRARY DEPENDENCIES:
(
(cannon/gravity/src/cannon_init.c)
(cannon/gravity/src/cannon_numeric.c)
(mongoose_httpd/src/http_server.cpp)
)
*************************************************************/
#include "sim_objects/default_trick_sys.sm"
// Uncomment to get a webserver. Also uncomment lines in S_overrise.mk to link in mongoose lib.
// #include "mongoose_httpd/mongoose_httpd.sm"
##include "cannon/gravity/include/cannon_numeric.h"
##include "mongoose_httpd/include/http_server.h"
class HttpSimObject : public Trick::SimObject {
public:
HTTP_Server http_server ;
HttpSimObject() {
("default_data") http_default_data( &http_server ) ;
("initialization") http_init( &http_server ) ;
("shutdown") http_shutdown( &http_server ) ;
}
} ;
class CannonSimObject : public Trick::SimObject {
public:
@ -38,10 +27,7 @@ class CannonSimObject : public Trick::SimObject {
("dynamic_event") cannon_impact( &cannon) ;
}
} ;
// Instantiations
CannonSimObject dyn ;
HttpSimObject http ;
IntegLoop dyn_integloop (0.01) dyn;

View File

@ -1,7 +1,6 @@
TRICK_CFLAGS += -I/usr/include -I../models
TRICK_CXXFLAGS += -I/usr/include -I../models
TRICK_CFLAGS += -I../models
TRICK_CXXFLAGS += -I../models
TRICK_SFLAGS += -I../models
TRICK_LDFLAGS += -L/usr/local/lib
TRICK_USER_LINK_LIBS += -lmongoose

View File

@ -1,5 +1,7 @@
/*************************************************************************
PURPOSE: (Represent the state and initial conditions of an http server)
LIBRARY DEPENDENCIES:
( (../src/http_server.cpp))
**************************************************************************/
#ifndef HTTP_SERVER_H
#define HTTP_SERVER_H

View File

@ -0,0 +1,21 @@
/************************TRICK HEADER*************************
PURPOSE:
(HTTP Server)
LIBRARY DEPENDENCIES:
((src/http_server.cpp))
*************************************************************/
##include "mongoose_httpd/include/http_server.h"
class HttpSimObject : public Trick::SimObject {
public:
HTTP_Server http_server ;
HttpSimObject() {
("default_data") http_default_data( &http_server ) ;
("initialization") http_init( &http_server ) ;
("shutdown") http_shutdown( &http_server ) ;
}
};
HttpSimObject http ;