forked from markparticle/WebServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fde49f2
commit 1cba332
Showing
9 changed files
with
87 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,10 @@ | |
!*.h | ||
!LICENSE | ||
!makefile | ||
!Makefile | ||
|
||
*.o | ||
*.1 | ||
*.log | ||
*.exe | ||
/.vscode | ||
/source.cpp | ||
/source.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
all: | ||
mkdir -p bin | ||
cd build && make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#heaptimer.cpp | ||
CXX = g++ | ||
CFLAGS = -std=c++14 -O2 -Wall -g | ||
|
||
TARGET = server | ||
OBJS = ../code/log/*.cpp ../code/pool/*.cpp ../code/timer/*.cpp \ | ||
../code/http/*.cpp ../code/server/*.cpp \ | ||
../code/buffer/*.cpp ../code/main.cpp | ||
|
||
all: $(OBJS) | ||
$(CXX) $(CFLAGS) $(OBJS) -o ../bin/$(TARGET) -pthread -lmysqlclient | ||
|
||
clean: | ||
rm -rf ../bin/$(OBJS) $(TARGET) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* | ||
* @Author : mark | ||
* @Date : 2020-06-28 | ||
* @copyleft GPL 2.0 | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
CXX = g++ | ||
CFLAGS = -std=c++14 -O2 -Wall -g | ||
|
||
TARGET = server | ||
OBJS = ../code/log/*.cpp ../code/pool/*.cpp ../code/timer/*.cpp \ | ||
../code/http/*.cpp ../code/server/*.cpp \ | ||
../code/buffer/*.cpp ../code/main.cpp | ||
|
||
all: $(OBJS) | ||
$(CXX) $(CFLAGS) $(OBJS) -o ../bin/$(TARGET) -pthread -lmysqlclient | ||
|
||
clean: | ||
rm -rf ../bin/$(OBJS) $(TARGET) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
单元测试 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
CFLAGS?= -Wall -ggdb -W -O | ||
CC?= gcc | ||
LIBS?= | ||
LDFLAGS?= | ||
PREFIX?= /usr/local | ||
VERSION=1.5 | ||
TMPDIR=/tmp/webbench-$(VERSION) | ||
|
||
all: webbench tags | ||
|
||
tags: *.c | ||
-ctags *.c | ||
|
||
install: webbench | ||
install -s webbench $(DESTDIR)$(PREFIX)/bin | ||
install -m 644 webbench.1 $(DESTDIR)$(PREFIX)/man/man1 | ||
install -d $(DESTDIR)$(PREFIX)/share/doc/webbench | ||
install -m 644 debian/copyright $(DESTDIR)$(PREFIX)/share/doc/webbench | ||
install -m 644 debian/changelog $(DESTDIR)$(PREFIX)/share/doc/webbench | ||
|
||
webbench: webbench.o Makefile | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o webbench webbench.o $(LIBS) | ||
|
||
clean: | ||
-rm -f *.o webbench *~ core *.core tags | ||
|
||
tar: clean | ||
-debian/rules clean | ||
rm -rf $(TMPDIR) | ||
install -d $(TMPDIR) | ||
cp -p Makefile webbench.c socket.c webbench.1 $(TMPDIR) | ||
install -d $(TMPDIR)/debian | ||
-cp -p debian/* $(TMPDIR)/debian | ||
ln -sf debian/copyright $(TMPDIR)/COPYRIGHT | ||
ln -sf debian/changelog $(TMPDIR)/ChangeLog | ||
-cd $(TMPDIR) && cd .. && tar cozf webbench-$(VERSION).tar.gz webbench-$(VERSION) | ||
|
||
webbench.o: webbench.c socket.c Makefile | ||
|
||
.PHONY: clean install all tar |