diff options
| -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" |
