Update Makefile
This commit is contained in:
20
Makefile
20
Makefile
@@ -2,43 +2,45 @@ CC=gcc
|
||||
CFLAGS=-Wall -Wextra -ggdb -I.
|
||||
LDFLAGS=-lpthread
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: build/hello_server build/hello_client build/hello_server_v6 \
|
||||
build/hello_client_v6 build/chat_server build/chat_client \
|
||||
build/udp_server build/udp_client build/http_request
|
||||
|
||||
build/hello_server: examples/hello_server.c
|
||||
build/hello_server: examples/hello_server.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/hello_server examples/hello_server.c $(LDFLAGS)
|
||||
|
||||
build/hello_client: examples/hello_client.c
|
||||
build/hello_client: examples/hello_client.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/hello_client examples/hello_client.c $(LDFLAGS)
|
||||
|
||||
build/hello_server_v6: examples/hello_server_v6.c
|
||||
build/hello_server_v6: examples/hello_server_v6.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/hello_server_v6 examples/hello_server_v6.c $(LDFLAGS)
|
||||
|
||||
build/hello_client_v6: examples/hello_client_v6.c
|
||||
build/hello_client_v6: examples/hello_client_v6.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/hello_client_v6 examples/hello_client_v6.c $(LDFLAGS)
|
||||
|
||||
build/chat_server: examples/chat_server.c
|
||||
build/chat_server: examples/chat_server.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/chat_server examples/chat_server.c $(LDFLAGS)
|
||||
|
||||
build/chat_client: examples/chat_client.c
|
||||
build/chat_client: examples/chat_client.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/chat_client examples/chat_client.c $(LDFLAGS)
|
||||
|
||||
build/udp_server: examples/udp_server.c
|
||||
build/udp_server: examples/udp_server.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/udp_server examples/udp_server.c $(LDFLAGS)
|
||||
|
||||
build/udp_client: examples/udp_client.c
|
||||
build/udp_client: examples/udp_client.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/udp_client examples/udp_client.c $(LDFLAGS)
|
||||
|
||||
build/http_request: examples/http_request.c
|
||||
build/http_request: examples/http_request.c sock.h
|
||||
@mkdir -p build
|
||||
$(CC) $(CFLAGS) -o build/http_request examples/http_request.c $(LDFLAGS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user