/[pcsclite]/trunk/Drivers/ccid/src/Makefile
ViewVC logotype

Contents of /trunk/Drivers/ccid/src/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 269 - (hide annotations) (download)
Tue Aug 12 12:40:23 2003 UTC (9 years, 9 months ago) by rousseau
File size: 1767 byte(s)
Initial revision
1 rousseau 269 #
2     # $Id$
3     #
4    
5     # name of bundle
6     BUNDLE=ifd-ccid.bundle
7    
8     # by default install in /usr/local
9     ifeq ($(DESTDIR),)
10     DESTDIR=/usr/local
11     endif
12    
13     # by default use /usr/local/pcsc/drivers/
14     ifeq ($(PCSCLITE_HP_DROPDIR),)
15     PCSCLITE_HP_DROPDIR=/usr/local/pcsc/drivers/
16     endif
17    
18     # use a correct default CFLAGS
19     ifeq ($(CFLAGS),)
20     CFLAGS = -O2 -g -Wall
21     endif
22    
23     CFLAGS += -fPIC -I. -I/usr/local/include -DPCSCLITE_HP_DROPDIR=\"$(PCSCLITE_HP_DROPDIR)$(BUNDLE)\"
24     LDFLAGS += -L/usr/local/lib -lusb
25    
26     # /home/rousseau/sc/pcsc/ccid-0.5.10 -> 0.5.10
27     version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
28    
29     objects = capabilities.o commands.o debug.o ifdhandler.o ccid_usb.o utils.o
30     parse_objects = parse.o
31     sources = $(objects:%.o=%.c) $(parse_objects:%.o=%.c)
32    
33     all: check expert
34    
35     check: check_stamp
36     check_stamp:
37     ./check
38     touch check_stamp
39    
40     expert: parse libccid.so
41    
42     parse: $(objects) tokenparser.o parse.o
43     $(CC) $(LDFLAGS) -o $@ $^
44    
45     libccid.so: $(objects)
46     $(CC) -shared $(LDFLAGS) -o $@ $(objects)
47     #strip $@
48    
49     clean:
50     rm -f $(objects)
51     rm -f libccid.so
52     rm -rf $(BUNDLE)
53     rm -f ifd-ccid
54     rm -f tokenparser.o parse.o
55     rm -f Makefile.bak
56     rm -f config.log
57    
58     distclean: clean
59     rm -f .dependencies
60     touch .dependencies
61     rm -f tags
62     rm -f tokenparser.c
63     rm -f check_stamp dep_stamp
64    
65     install: all
66     mkdir -p $(BUNDLE)/Contents/Linux/
67     cp libccid.so $(BUNDLE)/Contents/Linux/libccid.so.$(version)
68     sed s/VERSION/$(version)/ Info.plist > $(BUNDLE)/Contents/Info.plist
69     mkdir -p $(DESTDIR)/pcsc/drivers/
70     cp -r $(BUNDLE) $(DESTDIR)/pcsc/drivers/
71    
72     dep: dep_stamp
73     dep_stamp:
74     @echo "Making dependencies..."
75     makedepend -f - -I. -DPCSCLITE_MAX_CHANNELS=16 $(sources) > .dependencies
76     touch dep_stamp
77    
78     .dependencies: dep
79    
80     ctags:
81     ctags-exuberant *.h *.c
82    
83     .PHONY: common clean distclean dep ctags
84    
85     include .dependencies
86    

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5