Cleaner examples
- Use ${CXX} instead of explicit clang in the Makefile.
- More explanations.
- Use socat's fork option instead of a bash loop.
- Adds a run_* script for each example.
- Remove the useless "sleep" option in service2.
This commit is contained in:
parent
8bd46d2450
commit
f74f89734c
9 changed files with 89 additions and 26 deletions
10
Makefile
10
Makefile
|
|
@ -1,11 +1,11 @@
|
|||
all: pcat service service2
|
||||
all: pcat service1 service2
|
||||
|
||||
pcat: pcat.cpp
|
||||
clang++ pcat.cpp -o pcat
|
||||
${CXX} pcat.cpp -o pcat
|
||||
|
||||
service: service.cpp
|
||||
clang++ service.cpp -o service
|
||||
1service1: service1.cpp
|
||||
${CXX} service1.cpp -o service1
|
||||
|
||||
service2: service2.cpp
|
||||
clang++ service2.cpp -l pthread -o service2
|
||||
${CXX} service2.cpp -l pthread -o service2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue