aboutsummaryrefslogtreecommitdiff
path: root/client/makefile
blob: dcba6f30e6a8b461206d71f67d7434795c86f8cb (plain)
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
CC = gcc
LD = gcc
RM = rm -f
CFLAGS =
EXECNAME = main

SOURCES := $(wildcard *.c)
HEADERS := $(wildcard *.h)
OBJECTS := $(patsubst %.c,%.o, $(SOURCES))

all: main

.o:
	$(CC) -c $(CFLAGS) $<

$(EXECNAME): $(OBJECTS)
	$(CC) $(OBJECTS) -o $(EXECNAME)

clean:
	$(RM) $(EXECNAME) *.o

format:
	clang-format -i $(SOURCES) $(HEADERS)

compile_commands: clean
	bear -- make