2023-06-03 19:52:10 +00:00
|
|
|
TARGET = ciadpi
|
|
|
|
|
2024-08-19 12:35:13 +00:00
|
|
|
CPPFLAGS = -D_DEFAULT_SOURCE
|
2024-08-06 21:03:15 +00:00
|
|
|
CFLAGS += -I. -std=c99 -Wall -Wno-unused -O2
|
|
|
|
WIN_LDFLAGS = -lws2_32 -lmswsock
|
2023-06-03 19:52:10 +00:00
|
|
|
|
2024-08-06 21:03:15 +00:00
|
|
|
SRC = packets.c main.c conev.c proxy.c desync.c mpool.c extend.c
|
|
|
|
WIN_SRC = win_service.c
|
|
|
|
|
2024-09-11 12:53:41 +00:00
|
|
|
PREFIX := /usr/local
|
|
|
|
INSTALL_DIR := $(DESTDIR)$(PREFIX)/bin/
|
|
|
|
|
2024-11-10 23:17:25 +00:00
|
|
|
all:
|
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(SRC) -o $(TARGET) $(LDFLAGS)
|
2024-08-06 21:03:15 +00:00
|
|
|
|
2024-11-10 23:17:25 +00:00
|
|
|
windows:
|
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(SRC) $(WIN_SRC) -o $(TARGET).exe $(WIN_LDFLAGS)
|
2024-02-18 20:20:52 +00:00
|
|
|
|
2023-06-03 19:52:10 +00:00
|
|
|
clean:
|
2024-08-06 21:03:15 +00:00
|
|
|
rm -f $(TARGET) $(TARGET).exe $(OBJ) $(WIN_OBJ)
|
2024-09-11 12:53:41 +00:00
|
|
|
|
2024-11-10 23:17:25 +00:00
|
|
|
install: all
|
2024-09-11 12:53:41 +00:00
|
|
|
mkdir -p $(INSTALL_DIR)
|
|
|
|
install -m 755 $(TARGET) $(INSTALL_DIR)
|