aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2fb4a889..901dc9df 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ MKDIR = mkdir -p
DVBFORMATCONVERT = dvb-format-convert
DVBV3DIRS = atsc dvb-c dvb-s dvb-t
+DVBV5DIRS = $(DVBV3DIRS) isdb-t
DVBV3CHANNELFILES = $(foreach dir,$(DVBV3DIRS),$(wildcard $(dir)/*))
@@ -25,6 +26,22 @@ DVBV5OUTPUTDIR = dvbv5
PHONY := clean dvbv3 dvbv5
+ifeq ($(PREFIX),)
+PREFIX = /usr/local
+endif
+
+ifeq ($(DATADIR),)
+DATADIR = $(PREFIX)/share
+endif
+
+ifeq ($(DVBV5DIR),)
+DVBV5DIR = dvbv5
+endif
+
+ifeq ($(DVBV3DIR),)
+DVBV3DIR = dvbv3
+endif
+
dvbv3:
@$(foreach var,$(DVBV3DIRS), $(MKDIR) $(DVBV3OUTPUTDIR)/$(var);)
@$(foreach var,$(DVBV3CHANNELFILES), $(DVBFORMATCONVERT) $(DVBFORMATCONVERT_CHANNEL_DVBV3) $(var) $(DVBV3OUTPUTDIR)/$(var);)
@@ -34,6 +51,13 @@ dvbv5: $(DVBV3OUTPUTDIR)
@$(foreach var,$(DVBV3DIRS), $(MKDIR) $(DVBV5OUTPUTDIR)/$(var);)
@$(foreach var,$(DVBV3CHANNELFILES), $(DVBFORMATCONVERT) $(DVBFORMATCONVERT_CHANNEL_DVBV5) $(DVBV3OUTPUTDIR)/$(var) $(DVBV5OUTPUTDIR)/$(var);)
+install:
+ @mkdir -p $(DATADIR)/$(DVBV5DIR)
+ $(foreach var,$(DVBV5DIRS), install -d -p $(DATADIR)/$(DVBV5DIR)/$(var); install -D -p -m 644 $(var)/* $(DATADIR)/$(DVBV5DIR)/$(var);)
+
+install_v3:
+ @mkdir -p $(DATADIR)/$(DVBV3DIR)
+ $(foreach var,$(DVBV3DIRS), install -d -p $(DATADIR)/$(DVBV3DIR)/$(var); install -D -p -m 644 $(DVBV3OUTPUTDIR)/$(var)/* $(DATADIR)/$(DVBV3DIR)/$(var);)
clean:
rm -rf $(DVBV3OUTPUTDIR)/ $(DVBV5OUTPUTDIR)/