mongoose/examples/Makefile

71 lines
1.7 KiB
Makefile
Raw Normal View History

2014-03-02 20:23:53 +08:00
CFLAGS = -W -Wall -I.. -pthread -g -pipe $(CFLAGS_EXTRA)
RM = rm -rf
OUT = -o $@
2013-08-16 18:17:15 +08:00
ifeq ($(OS),Windows_NT)
2014-03-02 20:23:53 +08:00
MSVC = ../../vc6
2014-01-12 00:18:29 +08:00
RM = del /q /f
2014-03-02 20:23:53 +08:00
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)
2013-08-16 18:17:15 +08:00
else
UNAME_S := $(shell uname -s)
2014-04-08 02:07:41 +08:00
CC = g++
CFLAGS += -lssl -g -O0
2012-09-25 04:25:06 +08:00
2013-08-16 18:17:15 +08:00
ifeq ($(UNAME_S),Linux)
CFLAGS += -ldl
endif
2012-09-25 04:25:06 +08:00
2013-08-16 18:17:15 +08:00
ifeq ($(UNAME_S),Darwin)
endif
endif
all: hello websocket server post multi_threaded upload auth
2014-02-07 21:03:11 +08:00
# To enable Lua in a server, uncomment following lines
LUA = ../lua-5.2.3/src
2014-03-09 21:12:49 +08:00
#CFLAGS += -I$(LUA) -L$(LUA) -llua -DMONGOOSE_USE_LUA
2014-02-07 21:03:11 +08:00
2014-03-02 20:23:53 +08:00
server: server.c ../mongoose.c
$(CC) server.c ../mongoose.c $(OUT) $(CFLAGS)
hello: hello.c ../mongoose.c
2014-03-02 20:23:53 +08:00
$(CC) hello.c ../mongoose.c $(OUT) $(CFLAGS)
websocket: websocket_html.c websocket.c ../mongoose.c
2014-03-02 20:23:53 +08:00
$(CC) websocket.c websocket_html.c ../mongoose.c $(OUT) $(CFLAGS)
post: post.c ../mongoose.c
2014-03-02 20:23:53 +08:00
$(CC) post.c ../mongoose.c $(OUT) $(CFLAGS)
multi_threaded: multi_threaded.c ../mongoose.c
2014-03-02 20:23:53 +08:00
$(CC) multi_threaded.c ../mongoose.c $(OUT) $(CFLAGS)
upload: upload.c ../mongoose.c
2014-03-02 20:23:53 +08:00
$(CC) upload.c ../mongoose.c $(OUT) $(CFLAGS)
auth: auth.c ../mongoose.c
2014-03-02 20:23:53 +08:00
$(CC) auth.c ../mongoose.c $(OUT) $(CFLAGS)
2014-04-11 05:18:01 +08:00
form: form.c ../mongoose.c
$(CC) form.c ../mongoose.c $(OUT) $(CFLAGS)
2014-03-05 04:22:46 +08:00
mjpg: mjpg.c ../mongoose.c
$(CC) mjpg.c ../mongoose.c $(OUT) $(CFLAGS)
2014-05-12 17:47:08 +08:00
proxy: proxy.c ../mongoose.c
$(CC) proxy.c ../mongoose.c $(OUT) -I../../net_skeleton $(CFLAGS)
2014-03-05 04:22:46 +08:00
websocket_html.c: websocket.html
perl mkdata.pl $< > $@
2013-08-16 18:17:15 +08:00
2014-02-20 20:13:59 +08:00
u:
2014-04-08 02:07:41 +08:00
$(CC) unit_test.c $(OUT) $(CFLAGS)
./$@
2014-02-20 20:13:59 +08:00
2012-10-14 22:00:04 +08:00
clean:
2014-05-13 17:56:32 +08:00
-@$(RM) hello mjpg upload post websocket auth server multi_threaded proxy websocket_html.c *.exe *.dSYM *.obj .*o u a.out