summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/openocd.c4
-rw-r--r--src/server/Makefile.am1
-rw-r--r--src/server/httpd_stubs.c32
3 files changed, 33 insertions, 4 deletions
diff --git a/src/openocd.c b/src/openocd.c
index 1f458372..9a080191 100644
--- a/src/openocd.c
+++ b/src/openocd.c
@@ -244,10 +244,8 @@ int openocd_main(int argc, char *argv[])
if (ret != ERROR_OK)
return EXIT_FAILURE;
-#if BUILD_HTTPD
if (httpd_start(cmd_ctx) != ERROR_OK)
return EXIT_FAILURE;
-#endif
ret = server_init(cmd_ctx);
if (ERROR_OK != ret)
@@ -266,9 +264,7 @@ int openocd_main(int argc, char *argv[])
server_quit();
-#if BUILD_HTTPD
httpd_stop();
-#endif
unregister_all_commands(cmd_ctx, NULL);
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index b47b8d09..989a682c 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -14,6 +14,7 @@ libserver_la_SOURCES = server.c telnet_server.c gdb_server.c
if HTTPD
libserver_la_SOURCES += httpd.c
else
+libserver_la_SOURCES += httpd_stubs.c
if !ECOSBOARD
libserver_la_SOURCES += server_stubs.c
endif
diff --git a/src/server/httpd_stubs.c b/src/server/httpd_stubs.c
new file mode 100644
index 00000000..0a63362c
--- /dev/null
+++ b/src/server/httpd_stubs.c
@@ -0,0 +1,32 @@
+/***************************************************************************
+ * Copyright (C) 2009 Zachary T Welch <zw@superlucidity.net> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "httpd.h"
+
+int httpd_start(struct command_context *cmd_ctx)
+{
+ LOG_DEBUG("libocdserver was built without HTTPD support");
+ return ERROR_OK;
+}
+void httpd_stop(void)
+{
+}