-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 674 Bytes
/
Makefile
File metadata and controls
31 lines (21 loc) · 674 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
LIBS = -lpthread lib/liburiparser.a
CC = gcc -Iinclude -I./src
CFLAGS = -g -Wall
.PHONY: default all clean
default: crawler queue_test http_test
all: default
DEPS = src/html.h src/http.h src/list.h src/queue.h src/url.h
OBJ = src/crawler.o src/html.o src/http.o src/list.o src/queue.o src/url.o
QUEUE_OBJ = src/queue.o test/queue_test.o
HTTP_OBJ = src/http.o test/http_test.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
crawler: $(OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS)
queue_test : $(QUEUE_OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS)
http_test: $(HTTP_OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS)
clean:
-rm -f src/*.o test/*.o
-rm -f crawler queue_test http_test