-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (24 loc) · 1.02 KB
/
Makefile
File metadata and controls
31 lines (24 loc) · 1.02 KB
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
#------------------------------------------------------------------------------
# Makefile for CSE 130 Programming Assignment 0
#
# make makes split
# make test makes test
# make clean removes all binaries
#------------------------------------------------------------------------------
CC = clang
PROGRAM = httpserver
FLAGS = -O -Wall -Werror -Wextra -pedantic
LDFLAGS = -g
FILES = api/util.o api/queue.o api/completable.o actions/read_file.o actions/read_file_length.o api/request_handle.o io/request.o actions/write_file.o io/response.o io/worker.o io/bind.o
all:
make $(PROGRAM)
$(PROGRAM) : $(FILES) $(PROGRAM).c
$(CC) -pthread $(FLAGS) -o $(PROGRAM) $(FILES) $(PROGRAM).c $(LDFLAGS)
queue_test: $(FILES) test/queue_test.c
$(CC) -pthread $(FLAGS) -o queue_test $(FILES) test/queue_test.c $(LDFLAGS)
action_test: $(FILES) test/action_test.c
$(CC) $(FLAGS) -o action_test $(FILES) test/action_test.c $(LDFLAGS)
format:
clang-format *.c
clean :
rm -f $(PROGRAM) queue_test action_test *.o **/*.o