Mercurial > pt1
comparison arib25/src/Makefile @ 53:41a5481db56f
rearrange arib25 directory
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sun, 13 Sep 2009 02:11:33 +0900 |
parents | arib25v023/arib25/src/Makefile@f80731a89036 |
children | 080414aa8f21 |
comparison
equal
deleted
inserted
replaced
52:db7af62da709 | 53:41a5481db56f |
---|---|
1 PREFIX = /usr/local | |
2 MAJOR = 0 | |
3 MINOR = 2 | |
4 REVISION = 3 | |
5 VER = $(MAJOR).$(MINOR).$(REVISION) | |
6 | |
7 DEST_HEADER = $(PREFIX)/include/arib25 | |
8 | |
9 CC = gcc | |
10 PCSC_CFLAGS ?= `pkg-config libpcsclite --cflags` | |
11 CPPFLAGS = -Wall $(PCSC_CFLAGS) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 | |
12 CFLAGS = -O2 -g -fPIC | |
13 | |
14 PCSC_LIBS ?= `pkg-config libpcsclite --libs` | |
15 LIBS = $(PCSC_LIBS) -lm | |
16 LDFLAGS ?= | |
17 | |
18 OBJS = arib_std_b25.o b_cas_card.o multi2.o ts_section_parser.o | |
19 HEADERS = arib_std_b25.h b_cas_card.h portable.h | |
20 TARGET_APP = b25 | |
21 TARGET_LIB = libarib25.so | |
22 TARGETS = $(TARGET_APP) $(TARGET_LIB) | |
23 DEPEND = Makefile.dep | |
24 SONAME = $(TARGET_LIB).$(MAJOR) | |
25 | |
26 all: $(TARGETS) | |
27 | |
28 clean: | |
29 rm -f $(OBJS) td.o $(TARGETS) $(DEPEND) | |
30 | |
31 $(TARGET_APP): $(OBJS) td.o | |
32 $(CC) $(LDFLAGS) -o $(TARGET_APP) $(OBJS) td.o $(LIBS) | |
33 | |
34 $(TARGET_LIB): $(OBJS) | |
35 $(CC) $(LDFLAGS) -shared -o $(TARGET_LIB) $(OBJS) $(LIBS) -Wl,-soname,$(SONAME) | |
36 | |
37 $(DEPEND): | |
38 $(CC) -MM $(OBJS:.o=.c) $(CPPFLAGS) > $@ | |
39 | |
40 install: $(TARGET) install-headers | |
41 install -m755 b25 $(PREFIX)/bin | |
42 install -m755 $(TARGET_LIB) $(PREFIX)/lib/$(TARGET_LIB).$(VER) | |
43 ln -sf $(PREFIX)/lib/$(TARGET_LIB).$(VER) $(PREFIX)/lib/$(TARGET_LIB).$(MAJOR) | |
44 ln -sf $(PREFIX)/lib/$(TARGET_LIB).$(MAJOR) $(PREFIX)/lib/$(TARGET_LIB) | |
45 ldconfig | |
46 | |
47 install-headers: | |
48 mkdir -p $(DEST_HEADER) | |
49 install -m644 $(HEADERS) $(DEST_HEADER) | |
50 | |
51 -include Makefile.dep |