diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-04-26 12:39:22 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-04-26 12:39:22 +0200 |
commit | d067eacc112f2453e95f0dde89bb0f60f170a195 (patch) | |
tree | a8066fb861ecaa2162e6e9683fb201d4e1600fe7 /client/makefile | |
parent | 8db9589e6ca1757a5c5224fe5b913828d9ec0cb3 (diff) |
project restructure + help in readme.md
Diffstat (limited to 'client/makefile')
-rw-r--r-- | client/makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/client/makefile b/client/makefile new file mode 100644 index 0000000..dcba6f3 --- /dev/null +++ b/client/makefile @@ -0,0 +1,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 + |