refactor: reorganize into subdirs (config/ util/ http/ notifs/ queue/ integrations/ static/)
This commit is contained in:
@@ -1,16 +1,29 @@
|
|||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -O2 -Wall -Wextra -I. -pthread
|
CFLAGS = -O2 -Wall -Wextra -pthread \
|
||||||
|
-I. -Iconfig -Iutil -Ihttp -Inotifs -Iqueue -Iintegrations
|
||||||
LDFLAGS = -pthread -lcurl
|
LDFLAGS = -pthread -lcurl
|
||||||
TARGET = iptv-dl
|
TARGET = iptv-dl
|
||||||
SRCS = main.c config.c buf.c json.c http.c discord.c jellyfin.c \
|
|
||||||
iptv_api.c queue.c notify.c handlers.c server.c
|
|
||||||
OBJS = $(SRCS:.c=.o)
|
|
||||||
|
|
||||||
# Install paths (override with: make install PREFIX=/usr/local)
|
SRCS = main.c \
|
||||||
PREFIX = /usr/local
|
config/config.c \
|
||||||
BINDIR = $(PREFIX)/bin
|
util/buf.c \
|
||||||
SHAREDIR = $(PREFIX)/share/iptv-dl
|
util/json.c \
|
||||||
SYSCONFDIR = /etc/iptv-downloader
|
http/http.c \
|
||||||
|
http/server.c \
|
||||||
|
http/handlers.c \
|
||||||
|
notifs/notify.c \
|
||||||
|
queue/iptv_api.c \
|
||||||
|
queue/queue.c \
|
||||||
|
integrations/discord.c \
|
||||||
|
integrations/jellyfin.c
|
||||||
|
|
||||||
|
OBJS = $(SRCS:.c=.o)
|
||||||
|
|
||||||
|
# Install paths (override: make install PREFIX=/usr/local)
|
||||||
|
PREFIX = /usr/local
|
||||||
|
BINDIR = $(PREFIX)/bin
|
||||||
|
SHAREDIR = $(PREFIX)/share/iptv-dl
|
||||||
|
SYSCONFDIR = /etc/iptv-downloader
|
||||||
|
|
||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
@@ -22,15 +35,17 @@ $(TARGET): $(OBJS)
|
|||||||
|
|
||||||
install: $(TARGET)
|
install: $(TARGET)
|
||||||
install -d $(BINDIR) $(SHAREDIR) $(SYSCONFDIR)
|
install -d $(BINDIR) $(SHAREDIR) $(SYSCONFDIR)
|
||||||
install -m 755 $(TARGET) $(BINDIR)/iptv-dl
|
install -m 755 $(TARGET) $(BINDIR)/iptv-dl
|
||||||
install -m 644 static/iptv.css $(SHAREDIR)/iptv.css
|
install -m 644 static/iptv.css $(SHAREDIR)/iptv.css
|
||||||
install -m 644 static/iptv.js $(SHAREDIR)/iptv.js
|
install -m 644 static/iptv.js $(SHAREDIR)/iptv.js
|
||||||
install -m 644 static/downloads.js $(SHAREDIR)/downloads.js
|
install -m 644 static/downloads.js $(SHAREDIR)/downloads.js
|
||||||
install -m 644 static/series_show.js $(SHAREDIR)/series_show.js
|
install -m 644 static/series_show.js $(SHAREDIR)/series_show.js
|
||||||
install -m 644 static/header.html $(SHAREDIR)/header.html
|
install -m 644 static/header.html $(SHAREDIR)/header.html
|
||||||
install -m 644 static/footer.html $(SHAREDIR)/footer.html
|
install -m 644 static/footer.html $(SHAREDIR)/footer.html
|
||||||
@echo "Installed. Create config at $(SYSCONFDIR)/config.json or ~/.iptv-downloader/config.json"
|
@echo ""
|
||||||
@echo "Run: $(BINDIR)/iptv-dl --dump-config (to see defaults)"
|
@echo "Installed to $(BINDIR)/iptv-dl"
|
||||||
|
@echo "Create config at ~/.iptv-downloader/config.json or $(SYSCONFDIR)/config.json"
|
||||||
|
@echo "Run: iptv-dl --dump-config (to see active defaults)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJS) $(TARGET)
|
rm -f $(OBJS) $(TARGET)
|
||||||
|
|||||||
Reference in New Issue
Block a user