/[tivodecode]/tivodecode/trunk/Makefile
ViewVC logotype

Contents of /tivodecode/trunk/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 66 - (show annotations) (download)
Wed Dec 13 00:43:25 2006 UTC (15 years, 5 months ago) by jeremyd2019
File size: 2269 byte(s)
make process_frame use a write function.  add target to make libtivodecode.a

1 # Makefile for tivodecode, (c) 2006, Jeremy Drake
2 # See COPYING file for license terms
3 CC=gcc
4 CFLAGS=-Wall -O3
5 DEFINES=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
6 override CFLAGS+=$(DEFINES)
7 LDFLAGS=
8 CTAGS=ctags
9 CTFLAGS=--c-types=+dfmstuv
10
11 OBJDIR=objects.dir
12 COMMONOBJS=hexlib.o TuringFast.o sha1.o tivo-parse.o turing_stream.o tivodecoder.o
13 PROGOBJS=tivodecode.o happyfile.o getopt.o getopt_long.o
14
15
16 REALCOMMONOBJS=$(patsubst %.o,$(OBJDIR)/%.o,$(COMMONOBJS))
17 REALPROGOBJS=$(patsubst %.o,$(OBJDIR)/%.o,$(PROGOBJS))
18 SRCS=$(patsubst %.o,%.c,$(OBJS))
19 HEADERS=QUTsbox.h Turing.h TuringMultab.h TuringSbox.h getopt_long.h happyfile.h hexlib.h sha1.h tivo-parse.h tivodecoder.h turing_stream.h
20
21 all: tivodecode libtivodecode.a
22
23 .PHONY: clean
24 clean:
25 rm -rf $(OBJDIR)
26
27 .PHONY: prep
28 prep:
29 mkdir -p $(OBJDIR)
30
31 .PHONY: tivodecode
32 tivodecode: prep $(OBJDIR)/tivodecode
33
34 .PHONY: libtivodecode.a
35 libtivodecode.a: prep $(OBJDIR)/libtivodecode.a
36
37 tags: $(SRCS) $(HEADERS)
38 $(CTAGS) $(CTFLAGS) $^
39
40 $(OBJDIR)/tivodecode: $(REALCOMMONOBJS) $(REALPROGOBJS)
41 $(CC) $(LDFLAGS) -o $@ $^
42
43 $(OBJDIR)/libtivodecode.a: $(REALCOMMONOBJS)
44 $(AR) r $@ $^
45
46 $(OBJDIR)/%.o: %.c $(HEADERS)
47 $(CC) $(CFLAGS) -c -o $@ $<
48
49 $(OBJDIR):
50 mkdir $(OBJDIR)
51
52
53 #############################################################################
54 # Do not use targets below here. They are for releasing new versions.
55 # Users should not use these. These are not the targets you are looking for...
56
57 CREL=$(if $(REL),$(strip $(subst .,_, $(REL))),YOU_NEED_A_RELEASE)
58 CVSROOT=:ext:jeremyd2019@tivodecode.cvs.sourceforge.net:/cvsroot/tivodecode
59 RELDIR=tivodecode-$(strip $(REL))
60
61 .PHONY: tag
62 tag:
63 @echo TAG = REL_$(CREL)
64 $(if $(filter YOU_NEED_A_RELEASE, $(CREL)), false SET A RELEASE, )
65 sed -i -e 's/^\(Version \)\([0-9.]\+\)$$/\1$(strip $(REL))/' README
66 sed -i -e 's/^\(static const char \* VERSION_STR = "\)\([0-9.]\+\)\(";\)$$/\1$(strip $(REL))\3/' tivodecode.c
67 cvs commit -m"Flag release $(strip $(REL))" README tivodecode.c
68 cvs tag REL_$(CREL)
69
70 .PHONY: release
71 release:
72 @echo TAG = REL_$(CREL)
73 @echo VER = $(strip $(REL))
74 $(if $(filter YOU_NEED_A_RELEASE, $(CREL)), false SET A RELEASE, )
75 cvs -d$(CVSROOT) export -rREL_$(CREL) -d$(RELDIR) tivodecode
76 tar -zcvf $(RELDIR).tar.gz $(RELDIR)/
77 rm -rf $(RELDIR)/

cvs@jdrake.com
ViewVC Help
Powered by ViewVC 1.1.13