diff options
| author | Soikk | 2025-12-08 21:13:31 +0100 |
|---|---|---|
| committer | Soikk | 2025-12-08 21:13:31 +0100 |
| commit | 02a27aa4ddef27d700001ecff265cad98cf7eb6a (patch) | |
| tree | 895f0df937106695e9bf003bcaa1fe62a67e8bab | |
| parent | 6cab1ce01bc4700e9afc76b38bec04257ea17544 (diff) | |
| download | soikk-server-02a27aa4ddef27d700001ecff265cad98cf7eb6a.tar.xz soikk-server-02a27aa4ddef27d700001ecff265cad98cf7eb6a.tar.zst | |
Cleaned up includes and makefile
| -rwxr-xr-x | Makefile | 11 | ||||
| -rwxr-xr-x | src/main.c | 2 | ||||
| -rwxr-xr-x | src/worker.c | 1 |
3 files changed, 7 insertions, 7 deletions
@@ -12,7 +12,8 @@ else RUNCMD = ./server.exe endif -OBJS = $(addprefix $(OBJDIR)/, bit.o files.o str.o log.o list.o crc64.o net.o mime.o rewrites.o config.o) +MAINOBJS = $(addprefix $(OBJDIR)/, bit.o list.o files.o str.o log.o mime.o rewrites.o config.o) +WORKEROBJS = $(addprefix $(OBJDIR)/, bit.o list.o files.o str.o log.o mime.o rewrites.o config.o net.o) INCL = -I$(LIBDIR) -I$(SRCDIR) @@ -20,11 +21,11 @@ INCL = -I$(LIBDIR) -I$(SRCDIR) all: server.exe worker.exe -server.exe: $(SRCDIR)/main.c $(OBJS) - $(CC) $< $(OBJS) $(INCL) $(CFLAGS) -o server.exe $(LDFLAGS) +server.exe: $(SRCDIR)/main.c $(MAINOBJS) + $(CC) $< $(MAINOBJS) $(INCL) $(CFLAGS) -o server.exe $(LDFLAGS) -worker.exe: $(SRCDIR)/worker.c $(OBJS) - $(CC) $< $(OBJS) $(INCL) $(CFLAGS) -o worker.exe $(LDFLAGS) +worker.exe: $(SRCDIR)/worker.c $(WORKEROBJS) + $(CC) $< $(WORKEROBJS) $(INCL) $(CFLAGS) -o worker.exe $(LDFLAGS) $(OBJDIR)/%.o: $(SRCDIR)/%/*.c $(SRCDIR)/%/*.h $(CC) -c $(SRCDIR)/$*/$*.c $(INCL) $(CFLAGS) -o $(OBJDIR)/$*.o $(LDFLAGS) @@ -1,7 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <signal.h> -#include <libgen.h> +#include <errno.h> #include <sys/wait.h> #include "str/str.h" #include "log/log.h" diff --git a/src/worker.c b/src/worker.c index e35a23c..2c20fb7 100755 --- a/src/worker.c +++ b/src/worker.c @@ -1,6 +1,5 @@ #include <stdio.h> #include <stdlib.h> -#include <sys/mman.h> #include "str/str.h" #include "net/net.h" #include "config/config.h" |
