/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#define IHaveSubdirs
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
SUBDIRS = xvtx-s
MakeSubdirs($(SUBDIRS))
#MakeLintLibSubdirs($(SUBDIRS))
#MakeLintSubdirs($(SUBDIRS), install.ln, install.ln)

/* where to install X-programs? */
XLOCALBIN = /usr/X11R6/bin

/* where to install normal programs? */
LOCALBIN = /usr/local/bin

/* where to install the X man pages? */
XMANDIR = /usr/X11R6/man/man1

/* where to install the normal man pages? */
MANDIR = /usr/man/man1

/* where to install the icon? */
XICONDIR = /usr/X11R6/share/icons/


SRCS1=\
log_signal_quality.c \
showview.c \
timer_form.c \
timer_form_cb.c \
dvb_formats.c \
recorder.c \
xcha.c \
xcha_main_form_cb.c \
xcha_main.c \
various.c \
idle_cb.c \
setup.c \
program_list.c \
vdr_list.c \
ost-tune-lib.c \
getpids.c \
beep.c \
import_dvb2000.c \
teletext_decoder.c \
nit.c \
eit.c \
sdt.c \
scanning.c \

OBJS1=\
log_signal_quality.o \
showview.o \
timer_form.o \
timer_form_cb.o \
dvb_formats.o \
recorder.o \
xcha.o \
xcha_main_form_cb.o \
xcha_main.o \
various.o \
idle_cb.o \
setup.o \
program_list.o \
vdr_list.o \
ost-tune-lib.o \
getpids.o \
beep.o \
import_dvb2000.o \
teletext_decoder.o \
nit.o \
eit.o \
sdt.o \
scanning.o \

# dependencies
showview.o : showview.c timers.h xcha.h xcha_proto.h
timer_form.o : timer_form.c timers.h xcha.h xcha_proto.h
timer_form_cb.o : timer_form_cb.c xcha.h xcha_proto.h
dvb_formats.o : dvb_formats.c dvb_formats.h xcha.h xcha_proto.h
recorder.o : recorder.c xcha.h xcha_proto.h
xcha.o : xcha.c xcha.h xcha_proto.h
xcha_main.o : xcha_main.c xcha.h xcha_proto.h
xcha_main_form_cb.o : xcha_main_form_cb.c xcha.h xcha_proto.h
various.o : various.c xcha.h xcha_proto.h
idle_cb.o : idle_cb.c xcha.h xcha_proto.h 
setup.o : setup.c xcha.h xcha_proto.h
program_list.o : program_list.c program_list.h xcha.h xcha_proto.h
vdr_list.o : vdr_list.c xcha.h xcha_proto.h
ost-tune-lib.o : ost-tune-lib.c xcha.h xcha_proto.h
getpids.o : getpids.c xcha.h xcha_proto.h
beep.o : beep.c xcha.h xcha_proto.h
import_dvb2000.o : import_dvb2000.c import_dvb2000.h xcha.h xcha_proto.h
teletext_decoder.o : teletext_decoder.c teletext_decoder.h xcha.h xcha_proto.h
nit.o : nit.c nit.h xcha.h xcha_proto.h indentifier.h descr.h
eit.o : eit.h xcha.h xcha_proto.h indentifier.h descr.h
sdt.o : sdt.c sdt.h xcha.h xcha_proto.h indentifier.h descr.h
scanning.o : scanning.c xcha.h xcha_proto.h

PROGRAMS = xcha

all::  $(PROGRAMS)

XLOCAL_LIBRARIES =  -lforms -lm $(XAWLIB) $(XTOOLLIB) $(XLIB)

PTHREAD_LIBS = -lpthread

CXXEXTRA_DEFINES = -Wall

NormalProgramTarget(xcha, $(OBJS1), , $(XLOCAL_LIBRARIES), $(PTHREAD_LIBS) )

install:: 
	InstallProgram(xcha, $(XLOCALBIN))
	cp ./xcha.xpm $(XICONDIR)

install.man::
	InstallManPage(xcha, $(XMANDIR))
	
clear::
	$(RM) $(PROGRAMS)
