aboutsummaryrefslogtreecommitdiffstats
path: root/util/scan/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'util/scan/Makefile')
-rw-r--r--util/scan/Makefile46
1 files changed, 33 insertions, 13 deletions
diff --git a/util/scan/Makefile b/util/scan/Makefile
index 4b29842..32d1f1c 100644
--- a/util/scan/Makefile
+++ b/util/scan/Makefile
@@ -1,21 +1,41 @@
+# Makefile for linuxtv.org dvb-apps/util/scan
-CC = gcc
-CFLAGS = -MD -g -Wall -O2 -I../../include
-LFLAGS = -g -Wall
+objects = atsc_psip_section.o \
+ diseqc.o \
+ dump-vdr.o \
+ dump-zap.o \
+ lnb.o \
+ scan.o \
+ section.o
-OBJS = diseqc.o dump-zap.o dump-vdr.o scan.o lnb.o section.o atsc_psip_section.o
-SRCS = $(OBJS:.o=.c)
+binaries = scan
-TARGET = scan
+inst_bin = $(binaries)
-$(TARGET): $(OBJS)
- $(CC) $(LFLAGS) -o $(TARGET) $(OBJS)
+removing = atsc_psip_section.c atsc_psip_section.h
-.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
+CPPFLAGS += -DDATADIR=\"$(prefix)/share\"
-clean:
- $(RM) *.o *.d $(TARGET)
+.PHONY: all
--include $(wildcard *.d) dummy
+all: $(binaries)
+$(binaries): $(objects)
+
+$(objects): atsc_psip_section.c atsc_psip_section.h
+
+atsc_psip_section.c atsc_psip_section.h:
+ perl section_generate.pl atsc_psip_section.pl
+
+include ../../Make.rules
+
+install::
+ @echo installing scan files
+ @mkdir -p $(DESTDIR)$(sharedir)/dvb/atsc
+ @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-c
+ @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-s
+ @mkdir -p $(DESTDIR)$(sharedir)/dvb/dvb-t
+ @install -m 664 atsc/* $(DESTDIR)$(sharedir)/dvb/atsc/
+ @install -m 664 dvb-c/* $(DESTDIR)$(sharedir)/dvb/dvb-c/
+ @install -m 664 dvb-s/* $(DESTDIR)$(sharedir)/dvb/dvb-s/
+ @install -m 664 dvb-t/* $(DESTDIR)$(sharedir)/dvb/dvb-t/