summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: ca844291f2347b1a200c2c6cef8f5983a29d086c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CC=gcc
CFLAGS=-O3 -march=native -flto -pipe -g -fsanitize=address
LIBS=`pkg-config --cflags --libs openssl` -lpthread

OBJ = main.o client.o server.o
HEADERS = client.h server.h

%.o: %.c $(DEPS) $(HEADERS)
	$(CC) -c -o $@ $< $(CFLAGS) $(LIBS)

chat: $(OBJ)
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)

clean:
	rm $(OBJ)
	rm chat