aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
blob: 5bdd322e45e4d42dfc4bdacae1f500236e378c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
bttvdir=@bttvdir@

srcdir=@srcdir@
VPATH=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@

bindir=$(exec_prefix)/bin
mandir=$(prefix)/man

kdebindir=$(KDEDIR)/bin
kdelnkdir=$(KDEDIR)/share/applnk/Multimedia
kradiodir=$(KDEDIR)/share/apps/kradio

CC=@CC@
CXX=@CXX@
MOC=$(QTDIR)/bin/moc
DEPEND=@DEPEND@
INSTALL=@INSTALL@
INSTALL_PROGRAM=@INSTALL_PROGRAM@
INSTALL_DATA=@INSTALL_DATA@
INSTALL_DIR=mkdir -p

CFLAGS=-g -Wall @CFLAGS@ -I. @X_CFLAGS@ -I$(bttvdir)
CXXFLAGS = $(CFLAGS) -I$(QTDIR)/include -I$(KDEDIR)/include 
LDLIBS=@X_LIBS@ -l@XAWLIB@ -lXt @X_PRE_LIBS@ -lXext -lXmu \
	-lX11 @X_EXTRA_LIBS@ @LIBS@

PROGS=xawtv v4l-conf set-tv fbtv grab-one dump-mixers radio @KRADIO@

CHAN_SRCS= $(shell echo Channelmaps/*.chan)
SRCS=	$(srcdir)/main.c\
	$(srcdir)/toolbox.c\
	$(srcdir)/mixer.c\
	$(srcdir)/channel.c\
	$(srcdir)/x11.c\
	$(srcdir)/grab-v4l.c
OBJS= main.o toolbox.o mixer.o channel.o x11.o grab-v4l.o

##########################################################################

.SUFFIXES: .cpp .moc

.cpp.o:
	$(CXX) -c $(CXXFLAGS) $<

.h.moc:
	$(MOC) $< -o $@

##########################################################################

all: $(PROGS)

xawtv: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDLIBS) @JPEG@

v4l-conf: v4l-conf.c
	$(CC) $(CFLAGS) -o $@ $< @X_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@ @LIBS@

radio: radio.c
	$(CC) $(CFLAGS) -o $@ $<

dump-mixers: dump-mixers.c
	$(CC) $(CFLAGS) -o $@ $<

grab-one: grab-one.c
	$(CC) $(CFLAGS) -o $@ $<

set-tv: set-tv.o channel.o mixer.o grab-v4l.o
	$(CC) $(CFLAGS) -o $@ $^

fbtv: fbtv.o channel.o mixer.o grab-v4l.o
	$(CC) $(CFLAGS) -o $@ $^ @CURSES@ @JPEG@


kradio: kradio.moc kradio.o
	$(CXX) -o $@ kradio.o -L$(QTDIR)/lib -L$(KDEDIR)/lib @X_LIBS@ \
		-lkdeui -lkdecore -lqt @X_PRE_LIBS@ -lXext -lX11 @X_EXTRA_LIBS@


install: all
	$(INSTALL_PROGRAM) -s xawtv $(bindir)
	$(INSTALL_PROGRAM) -s set-tv $(bindir)
	$(INSTALL_PROGRAM) -s -m4711 -o root -g root v4l-conf $(bindir)
	$(INSTALL_DATA) xawtv.man $(mandir)/man1/xawtv.1
	$(INSTALL_DATA) Xawtv.ad @x_libraries@/X11/app-defaults/Xawtv
	if test "@KRADIO@" = "kradio"; then 			\
		$(INSTALL_PROGRAM) -s kradio $(kdebindir);	\
		$(INSTALL_DATA) *.kdelnk $(kdelnkdir);		\
		$(INSTALL_DIR) $(kradiodir)/toolbar;		\
		$(INSTALL_DATA) *.xpm $(kradiodir)/toolbar;	\
		make -C font install;				\
	fi
	if test -f fbtv; then					\
		$(INSTALL_PROGRAM) -s fbtv $(bindir);		\
	fi

clean:
	-rm -f *.o *.moc *~ core* *.bak TAGS

distclean: clean
	-rm -f config.cache config.h config.log config.status Makefile
	@echo "default:" > Makefile
	@echo "	@echo 'try ./configure && make dep && make'" >> Makefile
	-strip $(PROGS)

realclean: distclean
	-rm -f chan.h
	-rm -f $(PROGS)

depend dep:
	$(DEPEND) -- $(CFLAGS) -- $(SRCS) $(SRCS2)

#########################
# just for me...

tags:
	etags *.[ch]

check:
	ldd $(PROGS)

dist: distclean
	find . -name snap0*.ppm  -print | xargs -i rm -f
	find . -name snap0*.jpeg -print | xargs -i rm -f
	make -C bttv/driver clean
	make -C font dist
	dir=`pwd`; rel=`basename $$dir`; cd ..; tar cvzf $$rel.tar.gz $$rel

#-------------------------------------------------------------------------
# DO NOT DELETE THIS LINE -- make depend depends on it.

Privacy Policy