diff --git a/Makefile b/Makefile index 896ea8d..d0366ba 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ INCLUDE_DIRS =\ $(SRC_DIRS)\ $(CPPUTEST_HOME)/include -PRDUCT_MAIN_OBJ = src/main.o +PRODUCT_MAIN_OBJ = src/main.o include $(CPPUTEST_HOME)/build/MakefileWorker.mk @@ -40,8 +40,8 @@ $(EVALUATOR_LIB) : .PHONY: product product : $(PRODUCT) -$(PRODUCT): $(TARGET_LIB) $(PRDUCT_MAIN_OBJ) $(EVALUATOR_LIB) $(CPPUTEST_LIB) +$(PRODUCT): $(TARGET_LIB) $(PRODUCT_MAIN_OBJ) $(EVALUATOR_LIB) $(CPPUTEST_LIB) @echo 'Building target: $@' - $(CC) -o $@ -g $^ $(LD_LIBRARIES) - @echo 'Running the game. Go to your browser to play at http://localhst:8888' - ./$(PRODUCT) \ No newline at end of file + g++ -o $@ -g $(PRODUCT_MAIN_OBJ) $(TARGET_LIB) $(EVALUATOR_LIB) $(CPPUTEST_LIB) $(LD_LIBRARIES) + @echo 'Build completed. To run the game, execute: ./$(PRODUCT)' + @echo 'Then go to your browser to play at http://localhost:8888' \ No newline at end of file diff --git a/cpputest b/cpputest index 40d62a2..e332d88 160000 --- a/cpputest +++ b/cpputest @@ -1 +1 @@ -Subproject commit 40d62a2cec9fbf5626ea90f3afbe451ceb6dac8c +Subproject commit e332d88164090beba1060bd3159aea5ded3f5bba diff --git a/src/html_ui/html_game.c b/src/html_ui/html_game.c index f3239ba..f592f79 100644 --- a/src/html_ui/html_game.c +++ b/src/html_ui/html_game.c @@ -7,6 +7,9 @@ #include "agent.h" #include "ui_agent.h" +// Define the global function pointer +void (*shutdown_server)(void) = NULL; + static int ui_adaptor_pool_add_ui_adaptor(agent_t * ui); static agent_t * ui_adaptor_pool_get_ui_adaptor_by_id(int id); static void ui_adaptor_pool_remove(int id); diff --git a/src/html_ui/html_game.h b/src/html_ui/html_game.h index eb105ca..ac135c0 100644 --- a/src/html_ui/html_game.h +++ b/src/html_ui/html_game.h @@ -9,6 +9,6 @@ #define HTML_GAME_H_ int execute_game_command(const char * command, const char *parameters, char * buffer, int buffer_size); -void (*shutdown_server)(void); +extern void (*shutdown_server)(void); #endif /* HTML_GAME_H_ */ diff --git a/src/main.o b/src/main.o new file mode 100644 index 0000000..4921fd5 Binary files /dev/null and b/src/main.o differ