-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
32 lines (23 loc) · 969 Bytes
/
Makefile
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
all: gunrock_web
CC = g++
CFLAGS = -g -Werror -Wall -I include -I shared/include -I/usr/local/opt/[email protected]/include -I/opt/homebrew/Cellar/openssl@3/3.2.1/include
LDFLAGS = -L /opt/homebrew/Cellar/openssl@3/3.2.1/lib -lssl -lcrypto -pthread
VPATH = shared
OBJS = gunrock.o MyServerSocket.o MySocket.o HTTPRequest.o HTTPResponse.o http_parser.o HTTP.o HttpService.o HttpUtils.o FileService.o dthread.o WwwFormEncodedDict.o StringUtils.o Base64.o HttpClient.o HTTPClientResponse.o MySslSocket.o DistributedFileSystemService.o
-include $(OBJS:.o=.d)
gunrock_web: $(OBJS)
$(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS)
%.d: %.c
@set -e; gcc -MM $(CFLAGS) $< \
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@;
@[ -s $@ ] || rm -f $@
%.d: %.cpp
@set -e; $(CC) -MM $(CFLAGS) $< \
| sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@;
@[ -s $@ ] || rm -f $@
%.o: %.cpp
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.c
gcc $(CFLAGS) -c $< -o $@
clean:
rm -f gunrock_web *.o *~ core.* *.d