1 # Makefile for dtv-scan-tables (26 May 2014)
2 # Copyright 2014 Jonathan McCrohan <jmccrohan@gmail.com>
4 # The vast majority of the DVB scan files contained in this repository
5 # are DVBv3 scan files. This format has been deprecated in favor of the
8 # Use this makefile to convert the existing DVBv3 scan files to DVBv5
9 # scan files until such time as DVBv5 scan format is in widespread use.
11 # Requires dvb-format-convert from v4l-utils.
14 DVBFORMATCONVERT
= dvb-format-convert
16 DVBV3DIRS
= atsc dvb-c dvb-s dvb-t
17 DVBV5DIRS
= $(DVBV3DIRS
) isdb-t
19 DVBV3CHANNELFILES
= $(foreach dir,$(DVBV3DIRS
),$(wildcard $(dir)/*))
20 DVBV3OUTPUTFILES
= $(patsubst %,$(DVBV3OUTPUTDIR
)/%,$(DVBV3CHANNELFILES
))
21 DVBV5OUTPUTFILES
= $(patsubst %,$(DVBV5OUTPUTDIR
)/%,$(DVBV3CHANNELFILES
))
23 DVBFORMATCONVERT_CHANNEL_DVBV5
= -ICHANNEL
-ODVBV5
24 DVBFORMATCONVERT_CHANNEL_DVBV3
= -IDVBV5
-OCHANNEL
26 DVBV3OUTPUTDIR
= dvbv3
27 DVBV5OUTPUTDIR
= dvbv5
29 PHONY
:= clean dvbv3 dvbv5
36 DATADIR
= $(PREFIX
)/share
50 @
$(DVBFORMATCONVERT
) $(DVBFORMATCONVERT_CHANNEL_DVBV3
) "$<" "$@"
56 dvbv3
: $(DVBV3OUTPUTFILES
)
57 dvbv5
: $(DVBV5OUTPUTFILES
)
60 @mkdir
-p
$(DATADIR
)/$(DVBV5DIR
)
61 $(foreach var
,$(DVBV5DIRS
), install -d
-p
$(DATADIR
)/$(DVBV5DIR
)/$(var
); install -D
-p
-m
644 $(var
)/* $(DATADIR
)/$(DVBV5DIR
)/$(var
);)
64 @mkdir
-p
$(DATADIR
)/$(DVBV3DIR
)
65 $(foreach var
,$(DVBV3DIRS
), install -d
-p
$(DATADIR
)/$(DVBV3DIR
)/$(var
); install -D
-p
-m
644 $(DVBV3OUTPUTDIR
)/$(var
)/* $(DATADIR
)/$(DVBV3DIR
)/$(var
);)
68 rm -rf
$(DVBV3OUTPUTDIR
)/ $(DVBV5OUTPUTDIR
)/