add very small websocket example

This commit is contained in:
eddyem
2016-04-22 16:49:21 +03:00
parent ba10e91c35
commit 54f2b12d7d
9 changed files with 595 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
PROGRAM = websocktest
LDFLAGS = $(shell pkg-config --libs libwebsockets) -lpthread
SRCS = main.c que.c
CC = gcc
DEFINES += -DEBUG
CXX = gcc
CFLAGS = -Werror -Wextra $(DEFINES) $(shell pkg-config --cflags libwebsockets)
OBJS = $(SRCS:.c=.o)
all : $(PROGRAM)
$(PROGRAM) : $(OBJS)
$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(PROGRAM)
# some addition dependencies
# %.o: %.c
# $(CC) $(LDFLAGS) $(CFLAGS) $< -o $@
#$(SRCS) : %.c : %.h $(INDEPENDENT_HEADERS)
# @touch $@
clean:
/bin/rm -f *.o *~
depend:
$(CXX) -MM $(CXX.SRCS)