From e9bf02907798a8dd3b7b5c48893b0ca2544fb988 Mon Sep 17 00:00:00 2001 From: ruti <> Date: Mon, 11 Nov 2024 02:17:25 +0300 Subject: [PATCH] Dont use object files Hot fix for #213,#216, maybe #228 --- Makefile | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index c079598..f4f532d 100644 --- a/Makefile +++ b/Makefile @@ -7,26 +7,18 @@ WIN_LDFLAGS = -lws2_32 -lmswsock SRC = packets.c main.c conev.c proxy.c desync.c mpool.c extend.c WIN_SRC = win_service.c -OBJ = $(SRC:.c=.o) -WIN_OBJ = $(WIN_SRC:.c=.o) - PREFIX := /usr/local INSTALL_DIR := $(DESTDIR)$(PREFIX)/bin/ -all: $(TARGET) +all: + $(CC) $(CPPFLAGS) $(CFLAGS) $(SRC) -o $(TARGET) $(LDFLAGS) -$(TARGET): $(OBJ) - $(CC) -o $(TARGET) $(OBJ) $(LDFLAGS) - -windows: $(OBJ) $(WIN_OBJ) - $(CC) -o $(TARGET).exe $(OBJ) $(WIN_OBJ) $(WIN_LDFLAGS) - -.c.o: - $(CC) $(CPPFLAGS) $(CFLAGS) -c $< +windows: + $(CC) $(CPPFLAGS) $(CFLAGS) $(SRC) $(WIN_SRC) -o $(TARGET).exe $(WIN_LDFLAGS) clean: rm -f $(TARGET) $(TARGET).exe $(OBJ) $(WIN_OBJ) -install: $(TARGET) +install: all mkdir -p $(INSTALL_DIR) install -m 755 $(TARGET) $(INSTALL_DIR)