postnummer-app/backend/Makefile

20 lines
323 B
Makefile
Raw Normal View History

2023-02-09 09:25:15 +00:00
2023-02-09 12:50:26 +00:00
CFLAGS = -std=c17 -Wall -Wextra -Wpedantic -Wconversion
2023-02-09 09:25:15 +00:00
2023-02-09 12:50:26 +00:00
HEADERS = $(wildcard *.h)
2023-02-09 09:25:15 +00:00
2023-02-09 12:50:26 +00:00
all: compile_flags.txt server
server: main.o linux.o http.o
2023-02-09 12:52:25 +00:00
gcc $^ -o $@
2023-02-09 12:50:26 +00:00
%.o: %.c $(HEADERS)
2023-02-09 12:52:25 +00:00
gcc $< -c -o $@ $(CFLAGS)
2023-02-09 09:25:15 +00:00
clean:
2023-02-09 12:52:25 +00:00
rm -rf *.o server client
2023-02-09 12:50:26 +00:00
compile_flags.txt:
2023-02-09 12:52:25 +00:00
echo -xc $(CFLAGS) | sed 's/\s\+/\n/g' > compile_flags.txt
2023-02-09 09:25:15 +00:00