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)/*))
21 DVBFORMATCONVERT_CHANNEL_DVBV5
= -ICHANNEL
-ODVBV5
22 DVBFORMATCONVERT_CHANNEL_DVBV3
= -IDVBV5
-OCHANNEL
24 DVBV3OUTPUTDIR
= dvbv3
25 DVBV5OUTPUTDIR
= dvbv5
27 PHONY
:= clean dvbv3 dvbv5
34 DATADIR
= $(PREFIX
)/share
46 @
$(foreach var
,$(DVBV3DIRS
), $(MKDIR
) $(DVBV3OUTPUTDIR
)/$(var
);)
47 @
$(foreach var
,$(DVBV3CHANNELFILES
), $(DVBFORMATCONVERT
) $(DVBFORMATCONVERT_CHANNEL_DVBV3
) $(var
) $(DVBV3OUTPUTDIR
)/$(var
);)
50 dvbv5
: $(DVBV3OUTPUTDIR
)
51 @
$(foreach var
,$(DVBV3DIRS
), $(MKDIR
) $(DVBV5OUTPUTDIR
)/$(var
);)
52 @
$(foreach var
,$(DVBV3CHANNELFILES
), $(DVBFORMATCONVERT
) $(DVBFORMATCONVERT_CHANNEL_DVBV5
) $(DVBV3OUTPUTDIR
)/$(var
) $(DVBV5OUTPUTDIR
)/$(var
);)
55 @mkdir
-p
$(DATADIR
)/$(DVBV5DIR
)
56 $(foreach var
,$(DVBV5DIRS
), install -d
-p
$(DATADIR
)/$(DVBV5DIR
)/$(var
); install -D
-p
-m
644 $(var
)/* $(DATADIR
)/$(DVBV5DIR
)/$(var
);)
59 @mkdir
-p
$(DATADIR
)/$(DVBV3DIR
)
60 $(foreach var
,$(DVBV3DIRS
), install -d
-p
$(DATADIR
)/$(DVBV3DIR
)/$(var
); install -D
-p
-m
644 $(DVBV3OUTPUTDIR
)/$(var
)/* $(DATADIR
)/$(DVBV3DIR
)/$(var
);)
63 rm -rf
$(DVBV3OUTPUTDIR
)/ $(DVBV5OUTPUTDIR
)/