1
0
mirror of https://github.com/lammertb/libhttp.git synced 2025-08-07 16:02:55 +03:00

Small fixes in Makefile

This commit is contained in:
bel2125
2015-09-26 23:33:30 +02:00
parent ebc667a121
commit 63ef9cbd35
3 changed files with 5 additions and 3 deletions

View File

@@ -248,6 +248,7 @@ clean:
$(RMRF) $(BUILD_DIR) $(RMRF) $(BUILD_DIR)
$(eval version=$(shell grep "define CIVETWEB_VERSION" include/civetweb.h | sed 's|.*VERSION "\(.*\)"|\1|g')) $(eval version=$(shell grep "define CIVETWEB_VERSION" include/civetweb.h | sed 's|.*VERSION "\(.*\)"|\1|g'))
$(eval major=$(shell echo $(version) | cut -d'.' -f1)) $(eval major=$(shell echo $(version) | cut -d'.' -f1))
$(RMRF) lib$(CPROG).a
$(RMRF) lib$(CPROG).so $(RMRF) lib$(CPROG).so
$(RMRF) lib$(CPROG).so.$(major) $(RMRF) lib$(CPROG).so.$(major)
$(RMRF) lib$(CPROG).so.$(version).0 $(RMRF) lib$(CPROG).so.$(version).0

View File

@@ -12,7 +12,7 @@ SRC = embedded_c.c
TOP = ../.. TOP = ../..
CIVETWEB_LIB = libcivetweb.a CIVETWEB_LIB = libcivetweb.a
CFLAGS = -I$(TOP)/include $(COPT) -DUSE_WEBSOCKET CFLAGS = -I$(TOP)/include $(COPT) -DUSE_WEBSOCKET -DUSE_IPV6
LIBS = -lpthread LIBS = -lpthread
include $(TOP)/resources/Makefile.in-os include $(TOP)/resources/Makefile.in-os

View File

@@ -17,7 +17,7 @@
#define DOCUMENT_ROOT "." #define DOCUMENT_ROOT "."
#ifdef USE_IPV6 #ifdef USE_IPV6
#define PORT "8888,[::]:8888" #define PORT "8888,[::]:8886"
#else #else
#define PORT "8888" #define PORT "8888"
#endif #endif
@@ -251,7 +251,7 @@ int main(int argc, char *argv[])
struct mg_callbacks callbacks; struct mg_callbacks callbacks;
struct mg_context *ctx; struct mg_context *ctx;
struct mg_server_ports ports[32]; struct mg_server_ports ports[32];
size_t port_cnt, n; int port_cnt, n;
memset(&callbacks, 0, sizeof(callbacks)); memset(&callbacks, 0, sizeof(callbacks));
ctx = mg_start(&callbacks, 0, options); ctx = mg_start(&callbacks, 0, options);
@@ -282,6 +282,7 @@ int main(int argc, char *argv[])
memset(ports, 0, sizeof(ports)); memset(ports, 0, sizeof(ports));
port_cnt = mg_get_server_ports(ctx, 32, ports); port_cnt = mg_get_server_ports(ctx, 32, ports);
printf("\n%i listening ports:\n\n", port_cnt);
for (n=0; n<port_cnt && n<32; n++) { for (n=0; n<port_cnt && n<32; n++) {
const char *proto = ports[n].is_ssl ? "https" : "http"; const char *proto = ports[n].is_ssl ? "https" : "http";