annotate arib25v023/arib25/src/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 669f7080a8dc
children 08f9a97364e0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
20
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
1 PREFIX = /usr/local
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
2 MAJOR = 0
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
3 MINOR = 2
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
4 REVISION = 3
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
5 VER = $(MAJOR).$(MINOR).$(REVISION)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
6
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
7 DEST_HEADER = $(PREFIX)/include/arib25
0
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
8
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
9 CC = gcc
20
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
10 PCSC_CFLAGS ?= `pkg-config libpcsclite --cflags`
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
11 CPPFLAGS = -Wall $(PCSC_CFLAGS) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
12 CFLAGS = -O2 -g -fPIC
0
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
13
20
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
14 PCSC_LIBS ?= `pkg-config libpcsclite --libs`
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
15 LIBS = $(PCSC_LIBS) -lm
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
16 LDFLAGS ?=
0
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
17
20
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
18 OBJS = arib_std_b25.o b_cas_card.o multi2.o td.o ts_section_parser.o
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
19 HEADERS = arib_std_b25.h b_cas_card.h portable.h
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
20 TARGET_APP = b25
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
21 TARGET_LIB = libarib25.so
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
22 TARGETS = $(TARGET_APP) $(TARGET_LIB)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
23 DEPEND = Makefile.dep
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
24 SONAME = $(TARGET_LIB).$(MAJOR)
0
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
25
20
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
26 all: $(TARGETS)
0
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
27
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
28 clean:
67e8eca28a80 initial import
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
diff changeset
29 rm -f *.o
20
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
30 rm -f $(TARGETS)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
31
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
32 $(TARGET_APP): $(OBJS)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
33 $(CC) $(LDFLAGS) -o $(TARGET_APP) $(OBJS) $(LIBS)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
34
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
35 $(TARGET_LIB): $(OBJS)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
36 $(CC) $(LDFLAGS) -shared -o $(TARGET_LIB) $(OBJS) $(LIBS) -Wl,-soname,$(SONAME)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
37
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
38 $(DEPEND):
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
39 $(CC) -MM $(OBJS:.o=.c) $(CPPFLAGS) > $@
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
40
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
41 install: $(TARGET) install-headers
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
42 install -m755 b25 $(PREFIX)/bin
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
43 install -m755 $(TARGET_LIB) $(PREFIX)/lib/$(TARGET_LIB).$(VER)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
44 ln -sf $(PREFIX)/lib/$(TARGET_LIB).$(VER) $(PREFIX)/lib/$(TARGET_LIB).$(MAJOR)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
45 ln -sf $(PREFIX)/lib/$(TARGET_LIB).$(MAJOR) $(PREFIX)/lib/$(TARGET_LIB)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
46 ldconfig
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
47
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
48 install-headers:
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
49 mkdir -p $(DEST_HEADER)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
50 install -m644 $(HEADERS) $(DEST_HEADER)
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
51
669f7080a8dc reworked Makefile so that shared object would be built
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 3
diff changeset
52 -include Makefile.dep