refactor: split static/ into css/ js/ html/; add tests/test_json.c (15/15 pass)

This commit is contained in:
2026-06-09 01:04:50 +02:00
parent 32deda57e0
commit 9fc9494ccd
11 changed files with 91 additions and 17 deletions
+17 -11
View File
@@ -34,20 +34,26 @@ $(TARGET): $(OBJS)
$(CC) $(CFLAGS) -c $< -o $@
install: $(TARGET)
install -d $(BINDIR) $(SHAREDIR) $(SYSCONFDIR)
install -m 755 $(TARGET) $(BINDIR)/iptv-dl
install -m 644 static/iptv.css $(SHAREDIR)/iptv.css
install -m 644 static/iptv.js $(SHAREDIR)/iptv.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/header.html $(SHAREDIR)/header.html
install -m 644 static/footer.html $(SHAREDIR)/footer.html
install -d $(BINDIR) $(SHAREDIR)/css $(SHAREDIR)/js $(SHAREDIR)/html $(SYSCONFDIR)
install -m 755 $(TARGET) $(BINDIR)/iptv-dl
install -m 644 static/css/iptv.css $(SHAREDIR)/css/iptv.css
install -m 644 static/js/iptv.js $(SHAREDIR)/js/iptv.js
install -m 644 static/js/downloads.js $(SHAREDIR)/js/downloads.js
install -m 644 static/js/series_show.js $(SHAREDIR)/js/series_show.js
install -m 644 static/html/header.html $(SHAREDIR)/html/header.html
install -m 644 static/html/footer.html $(SHAREDIR)/html/footer.html
@echo ""
@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:
rm -f $(OBJS) $(TARGET)
test: tests/test_runner
./tests/test_runner
.PHONY: all install clean
tests/test_runner: tests/test_json.c util/json.c util/buf.c
$(CC) $(CFLAGS) $^ -o $@
clean:
rm -f $(OBJS) $(TARGET) tests/test_runner
.PHONY: all install clean test