Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
e0aceb4f
Commit
e0aceb4f
authored
Mar 02, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed windows build for examples
parent
ea9a60a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
26 deletions
+22
-26
Makefile
examples/Makefile
+18
-26
websocket.c
examples/websocket.c
+4
-0
No files found.
examples/Makefile
View file @
e0aceb4f
CFLAGS
=
-W
-Wall
-I
..
-pthread
-g
-pipe
$(CFLAGS_EXTRA)
RM
=
rm
-rf
CFLAGS
=
-W
-Wall
-I
..
-pthread
-g
-pipe
$(CFLAGS_EXTRA)
RM
=
rm
-rf
OUT
=
-o
$@
ifeq
($(OS),Windows_NT)
MSVC
=
../../vc6
MSVC
=
../../vc6
RM
=
del /q /f
CC
=
$(MSVC)
/bin/cl
$(CLFLAGS)
CLFLAGS
=
/MD /TC /nologo
$(CFLAGS_EXTRA)
/W3
\
/I
$(MSVC)
/include /I.. /Dsnprintf
=
_snprintf
LFLAGS
=
/link /incremental:no /libpath:
$(MSVC)
/lib /machine:IX86
OUT
=
CC
=
$(MSVC)
/bin/cl
CFLAGS
=
/MD /TC /nologo /W3 /I
$(MSVC)
/include /I..
CFLAGS
+=
/link /incremental:no /libpath:
$(MSVC)
/lib /machine:IX86
CFLAGS
+=
$(CFLAGS_EXTRA)
else
UNAME_S
:=
$(
shell
uname
-s
)
...
...
@@ -25,42 +27,32 @@ all: hello websocket server post multi_threaded upload auth
LUA
=
../lua-5.2.3/src
#CFLAGS += -I$(LUA) -L$(LUA) -llua
server
:
server.c ../mongoose.c
$(CC)
server.c ../mongoose.c
$(OUT)
$(CFLAGS)
hello
:
hello.c ../mongoose.c
$(CC)
hello.c ../mongoose.c
-o
hello
$(CFLAGS)
$(CC)
hello.c ../mongoose.c
$(OUT)
$(CFLAGS)
websocket
:
websocket_html.c websocket.c ../mongoose.c
$(CC)
websocket.c websocket_html.c ../mongoose.c
-o
websocket
$(CFLAGS)
server
:
server.c ../mongoose.c
$(CC)
server.c ../mongoose.c
-o
server
$(CFLAGS)
$(CC)
websocket.c websocket_html.c ../mongoose.c
$(OUT)
$(CFLAGS)
post
:
post.c ../mongoose.c
$(CC)
post.c ../mongoose.c
-o
post
$(CFLAGS)
$(CC)
post.c ../mongoose.c
$(OUT)
$(CFLAGS)
multi_threaded
:
multi_threaded.c ../mongoose.c
$(CC)
multi_threaded.c ../mongoose.c
-o
multi_threaded
$(CFLAGS)
$(CC)
multi_threaded.c ../mongoose.c
$(OUT)
$(CFLAGS)
upload
:
upload.c ../mongoose.c
$(CC)
upload.c ../mongoose.c
-o
upload
$(CFLAGS)
$(CC)
upload.c ../mongoose.c
$(OUT)
$(CFLAGS)
auth
:
auth.c ../mongoose.c
$(CC)
auth.c ../mongoose.c
-o
auth
$(CFLAGS)
$(CC)
auth.c ../mongoose.c
$(OUT)
$(CFLAGS)
websocket_html.c
:
websocket.html
perl mkdata.pl
$<
>
$@
windows
:
websocket_html.c
$(CL)
hello.c ../mongoose.c
$(CLFLAGS)
$(LFLAGS)
$(CL)
websocket.c websocket_html.c ../mongoose.c
$(CLFLAGS)
$(LFLAGS)
$(CL)
post.c ../mongoose.c
$(CLFLAGS)
$(LFLAGS)
$(CL)
multi_threaded.c ../mongoose.c
$(CLFLAGS)
$(LFLAGS)
$(CL)
upload.c ../mongoose.c
$(CLFLAGS)
$(LFLAGS)
$(CL)
auth.c ../mongoose.c
$(CLFLAGS)
$(LFLAGS)
$(CL)
server.c ../mongoose.c
$(CLFLAGS)
$(LFLAGS)
u
:
g++ unit_test.c
-Wall
-W
-pedantic
-lssl
-g
-O0
&&
./a.out
clean
:
-
@
$(RM)
hello upload post websocket auth server
*
.exe
*
.dSYM
*
.obj .
*
o
examples/websocket.c
View file @
e0aceb4f
...
...
@@ -2,6 +2,10 @@
#include <time.h>
#include "mongoose.h"
#ifdef _WIN32
#define snprintf _snprintf
#endif
extern
const
char
*
find_embedded_file
(
const
char
*
,
size_t
*
);
static
int
iterate_callback
(
struct
mg_connection
*
c
,
enum
mg_event
ev
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment