From 4fc63e059cbd173f60a8f585e57db11b672c38ec Mon Sep 17 00:00:00 2001 From: Thomas Davis Date: Tue, 20 Aug 2013 15:53:51 -0400 Subject: [PATCH] Fixed the md5 code inclusion in the build --- Makefile | 2 +- civetweb.c | 2 +- cpp/Makefile | 2 +- examples/Makefile | 22 +++++++++++----------- build/md5.c => md5.c | 0 build/md5.h => md5.h | 0 6 files changed, 14 insertions(+), 14 deletions(-) rename build/md5.c => md5.c (100%) rename build/md5.h => md5.h (100%) diff --git a/Makefile b/Makefile index 3de85606..2e65b4b7 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ YASSL_SOURCES = \ $(YASSL)/ctaocrypt/src/ecc.c $(YASSL)/src/ocsp.c $(YASSL)/src/crl.c \ $(YASSL)/ctaocrypt/src/hc128.c $(YASSL)/ctaocrypt/src/memory.c -LIB_SOURCES = civetweb.c build/md5.c +LIB_SOURCES = civetweb.c md5.c ALL_SOURCES = main.c $(LIB_SOURCES) build/sqlite3.c build/lsqlite3.c \ $(LUA_SOURCES) $(YASSL_SOURCES) diff --git a/civetweb.c b/civetweb.c index b7cc2537..e30ba501 100644 --- a/civetweb.c +++ b/civetweb.c @@ -18,7 +18,7 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#include "build/md5.h" +#include "md5.h" #if defined(_WIN32) #if !defined(_CRT_SECURE_NO_WARNINGS) diff --git a/cpp/Makefile b/cpp/Makefile index ea381c88..8bdec4ad 100644 --- a/cpp/Makefile +++ b/cpp/Makefile @@ -4,7 +4,7 @@ # CFLAGS= -W -Wall -Wno-unused-parameter -I.. -I. -g -LIB_SOURCES = CivetServer.cpp ../civetweb.c ../build/md5.c +LIB_SOURCES = CivetServer.cpp ../civetweb.c ../md5.c LIBS = -lpthread all: diff --git a/examples/Makefile b/examples/Makefile index 5348c66e..41514886 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,13 +1,13 @@ CFLAGS= -W -Wall -I.. -pthread -g - +LIB_SOURCE = ../civetweb.c ../md5.c all: OS=`uname`; \ test "$$OS" = Linux && LIBS="-ldl" ; \ - $(CC) $(CFLAGS) hello.c ../civetweb.c $$LIBS $(ADD) -o hello; - $(CC) $(CFLAGS) upload.c ../civetweb.c $$LIBS $(ADD) -o upload; - $(CC) $(CFLAGS) post.c ../civetweb.c $$LIBS $(ADD) -o post; - $(CC) $(CFLAGS) -DUSE_WEBSOCKET websocket.c ../civetweb.c $$LIBS $(ADD) -o websocket; - $(CC) $(CFLAGS) chat.c ../civetweb.c $$LIBS $(ADD) -o chat + $(CC) $(CFLAGS) hello.c $(LIB_SOURCE) $$LIBS $(ADD) -o hello; + $(CC) $(CFLAGS) upload.c $(LIB_SOURCE) $$LIBS $(ADD) -o upload; + $(CC) $(CFLAGS) post.c $(LIB_SOURCE) $$LIBS $(ADD) -o post; + $(CC) $(CFLAGS) -DUSE_WEBSOCKET websocket.c $(LIB_SOURCE) $$LIBS $(ADD) -o websocket; + $(CC) $(CFLAGS) chat.c $(LIB_SOURCE) $$LIBS $(ADD) -o chat MSVC = e:/vc6 @@ -17,11 +17,11 @@ CLFLAGS = /MD /TC /nologo $(DBG) /W3 /DNO_SSL \ /link /incremental:no /libpath:$(MSVC)/lib /machine:IX86 windows: - $(CL) upload.c ../civetweb.c $(CLFLAGS) - $(CL) hello.c ../civetweb.c $(CLFLAGS) - $(CL) upload.c ../civetweb.c $(CLFLAGS) - $(CL) post.c ../civetweb.c $(CLFLAGS) - $(CL) post.c ../civetweb.c $(CLFLAGS) + $(CL) upload.c $(LIB_SOURCE) $(CLFLAGS) + $(CL) hello.c $(LIB_SOURCE) $(CLFLAGS) + $(CL) upload.c $(LIB_SOURCE) $(CLFLAGS) + $(CL) post.c $(LIB_SOURCE) $(CLFLAGS) + $(CL) post.c $(LIB_SOURCE) $(CLFLAGS) $(CL) /DUSE_WEBSOCKET websocket.c ../civetweb.c $(CLFLAGS) clean: diff --git a/build/md5.c b/md5.c similarity index 100% rename from build/md5.c rename to md5.c diff --git a/build/md5.h b/md5.h similarity index 100% rename from build/md5.h rename to md5.h