basic structure and client process chain done
This commit is contained in:
parent
77657c7078
commit
83bd6fb796
21 changed files with 313 additions and 7 deletions
43
Makefile
Normal file
43
Makefile
Normal file
|
@ -0,0 +1,43 @@
|
|||
# Compiler
|
||||
CC := /opt/homebrew/opt/llvm/bin/clang
|
||||
# Compiler flags
|
||||
CFLAGS := -Wall -Wextra -Werror -Ilibs -fsanitize=address
|
||||
|
||||
# Directories
|
||||
SRCDIR := src
|
||||
BINDIR := bin
|
||||
LIBDIR := libs
|
||||
|
||||
# Source files
|
||||
SRCS := $(wildcard $(SRCDIR)/*.c)
|
||||
# Object files
|
||||
OBJS := $(patsubst $(SRCDIR)/%.c,$(BINDIR)/%.o,$(SRCS))
|
||||
|
||||
# Libraries
|
||||
LIBS := $(wildcard $(LIBDIR)/*/*.c)
|
||||
# Library object files
|
||||
LIBOBJS := $(patsubst %.c,%.o,$(LIBS))
|
||||
|
||||
# Target executables
|
||||
EXECUTABLES := $(patsubst $(SRCDIR)/%,$(BINDIR)/%,$(basename $(wildcard $(SRCDIR)/*/*.c)))
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(EXECUTABLES)
|
||||
|
||||
$(BINDIR)/%: $(BINDIR)/%.o $(LIBOBJS)
|
||||
$(CC) $(CFLAGS) $^ -o $@
|
||||
|
||||
$(BINDIR)/%.o: $(SRCDIR)/%.c | $(BINDIR)
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
||||
|
||||
$(BINDIR):
|
||||
mkdir -p $(BINDIR)
|
||||
|
||||
permissions: $(BINDIR)/djumbai_enqueue/djumbai_enqueue
|
||||
chown djumbaiq $(BINDIR)/djumbai_enqueue/djumbai_enqueue
|
||||
chmod u+s $(BINDIR)/djumbai_enqueue/djumbai_enqueue
|
||||
|
||||
clean:
|
||||
rm -rf $(BINDIR)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue