20 lines
308 B
Makefile
20 lines
308 B
Makefile
|
|
CFLAGS = -std=c17 -Wall -Wextra -Wpedantic -Wconversion
|
|
|
|
HEADERS = $(wildcard *.h)
|
|
|
|
all: compile_flags.txt server
|
|
|
|
server: main.o
|
|
gcc $^ -o $@
|
|
|
|
%.o: %.c $(HEADERS)
|
|
gcc $< -c -o $@ $(CFLAGS)
|
|
|
|
clean:
|
|
rm -rf *.o server client
|
|
|
|
compile_flags.txt:
|
|
echo -xc $(CFLAGS) | sed 's/\s\+/\n/g' > compile_flags.txt
|
|
|