diff options
author | justanothercatgirl <sotov@twistea.su> | 2025-02-08 22:13:52 +0300 |
---|---|---|
committer | justanothercatgirl <sotov@twistea.su> | 2025-02-08 22:13:52 +0300 |
commit | cab382db088d9f240253466a1c5a26c62f3967c8 (patch) | |
tree | c5502f1b49211dccd3e29e163e708708495a6407 /Makefile | |
parent | 3eeee14d5d5c93ae3d156aabae5a96d1c09f185a (diff) |
TODO: Implement multiplexing in worker threads (UDP loops), implement
channel_pool interface.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -8,18 +8,20 @@ CLINKS += -lc -lpthread # Where to build stuff BLDDIR ?= build TSTDIR ?= $(BLDDIR)/tests +# Library files +LIBFS = include/c_headers/include/container.h include/c_headers/include/rstypes.h -# This variable's value is NOT checked, only it's existence is checked. -# If you define it as `DEBUG = Off`, it will still build in debug mode -DEBUG = On +# TODO: remove in production build +DEBUG ?= 1 -ifdef $(DEBUG) - CFLAGS += -DDBG -ggdb -g +ifeq ($(DEBUG), 1) + CFLAGS += -DDBG -DLOG_DEBUG -ggdb -g endif .PHONY: clean all tests run_tests all: $(BLDDIR) $(BLDDIR)/server $(BLDDIR)/client tests + @echo DEBUG=$(DEBUG), CFLAGS=$(CFLAGS) $(BLDDIR): mkdir -p $(BLDDIR) @@ -32,15 +34,15 @@ $(BLDDIR)/packet.o: include/packet.c $(CC) -c $< $(CFLAGS) $(CLIBS) -o $@ # Server object files -$(BLDDIR)/s_%.o: server/%.c +$(BLDDIR)/s_%.o: server/%.c $(LIBFS) $(CC) -c $< $(CFLAGS) $(CLIBS) -o $@ # client object files -$(BLDDIR)/c_%.o: client/%.c +$(BLDDIR)/c_%.o: client/%.c $(LIBFS) $(CC) -c $< $(CFLAGS) $(CLIBS) -o $@ # test object files -$(TSTDIR)/%.o: test/%.c +$(TSTDIR)/%.o: test/%.c $(LIBFS) $(CC) -c $< $(CFLAGS) $(CLIBS) -o $@ # server executable |