-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 885 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 885 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
CC = gcc
CXX = g++
INCLUDE_OPENCV = `pkg-config --cflags --libs opencv`
LINK_PTHREAD = -lpthread
CLIENT = client.cpp
SERVER = server.cpp
OPEN_CV = openCV.cpp
PTHREAD = pthread.c
CLI = client
SER = server
CV = openCV
PTH = pthread
all: server client opencv pthread
server: $(SERVER) msg.hpp
$(CXX) $(SERVER) -o $(SER) -std=c++17 $(INCLUDE_OPENCV)
client: $(CLIENT) msg.hpp
$(CXX) $(CLIENT) -o $(CLI) -std=c++17 $(INCLUDE_OPENCV)
opencv: $(OPEN_CV)
$(CXX) $(OPEN_CV) -o $(CV) $(INCLUDE_OPENCV)
pthread: $(PTHREAD)
$(CC) $(PTHREAD) -o $(PTH) $(LINK_PTHREAD)
.PHONY: clean
clean:
rm $(CLI) $(SER) $(CV) $(PTH)
clean-folder:
rm -r b08902040*
create-file:
echo abc > b08902040_1_client_folder/file1
echo nihao > b08902040_1_client_folder/file3
echo nihaoah > b08902040_1_client_folder/file4
rm-file:
rm b08902040_1_client_folder/*