aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 333935f256da0c87ac94d338e4a386837221e656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CC ?= gcc

.PHONY: debug
debug: CFLAGS += -g -DDEBUG=1
debug: server client

.PHONY: all
all: client server

.PHONY: clean
clean:
	rm -rf client server *.o

%.o: %.c
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $< -o $@

client: client.o util.o
	$(CC) -o $@ $^

server: server.o util.o eventloop.o tsocket.o acceptor.o connection.o
	$(CC) -o $@ $^