comparison recpt1/Makefile @ 21:b63f5c100e5a

made recpt1 link against b25 shared object.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Wed, 25 Feb 2009 22:55:34 +0900
parents 0a6b831f4b89
children 9b36fdf7d5d0
comparison
equal deleted inserted replaced
20:669f7080a8dc 21:b63f5c100e5a
1 #!/usr/bin/make -f
2
3 # options
4 B25 = -DB25
5
6 ifdef B25
7 B25_PATH = ../arib25v023/arib25/src
8 B25_CLEAN = clean_b25
9 B25_OBJS_EXT = $(B25_PATH)/arib_std_b25.o $(B25_PATH)/b_cas_card.o $(B25_PATH)/multi2.o $(B25_PATH)/ts_section_parser.o
10 PCSC_LDLIBS ?= `pkg-config libpcsclite --libs`
11 B25_LIBS = $(PCSC_LDLIBS) -lm
12 endif
13
14 PREFIX = /usr/local 1 PREFIX = /usr/local
15 CC = gcc 2 CC = gcc
16 CPPFLAGS = -I../driver -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(B25) 3 CPPFLAGS = -I../driver -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DB25
17 CFLAGS = -O2 -g -pthread 4 CFLAGS = -O2 -g -pthread
5
6 PCSC_LIBS = `pkg-config libpcsclite --libs`
7 B25_LIBS = -larib25
8 LIBS = $(PCSC_LIBS) $(B25_LIBS) -lm -lpthread
18 LDFLAGS = 9 LDFLAGS =
19 10
20 OBJS = recpt1.o $(B25_OBJS_EXT) decoder.o 11 OBJS = recpt1.o decoder.o
21 LIBS = -lpthread
22 TARGET = recpt1 12 TARGET = recpt1
23 DEPEND = Makefile.dep 13 DEPEND = Makefile.dep
24 14
25 all: $(TARGET) 15 all: $(TARGET)
26 16
27 clean: $(B25_CLEAN) 17 clean:
28 rm -f $(OBJS) $(TARGET) $(DEPEND) 18 rm -f $(OBJS) $(TARGET) $(DEPEND)
29 19
30 ifdef B25
31 clean_b25:
32 cd $(B25_PATH); make clean
33 endif
34
35 $(TARGET): $(OBJS) 20 $(TARGET): $(OBJS)
36 $(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) $(B25_LIBS) 21 $(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
37 22
38 $(DEPEND): 23 $(DEPEND):
39 $(CC) -MM $(OBJS:.o=.c) $(CPPFLAGS) > $@ 24 $(CC) -MM $(OBJS:.o=.c) $(CPPFLAGS) > $@
40
41 # B25_OBJS_EXT
42 $(B25_PATH)/arib_std_b25.o:
43 cd $(B25_PATH); make all
44 $(B25_PATH)/b_cas_card.o:
45 cd $(B25_PATH); make all
46 $(B25_PATH)/multi2.o:
47 cd $(B25_PATH); make all
48 $(B25_PATH)/ts_section_parser.o:
49 cd $(B25_PATH); make all
50 25
51 install: $(TARGET) 26 install: $(TARGET)
52 install -m 755 $(TARGET) $(PREFIX)/bin 27 install -m 755 $(TARGET) $(PREFIX)/bin
53 28
54 -include Makefile.dep 29 -include Makefile.dep