Statistics
| Branch: | Revision:

root / libcacard / Makefile @ 26ca8c06

History | View | Annotate | Download (1.5 kB)

1
libcacard_includedir=$(includedir)/cacard
2

    
3
TOOLS += vscclient$(EXESUF)
4

    
5
# objects linked into a shared library, built with libtool with -fPIC if required
6
libcacard-obj-y=$(oslib-obj-y) error.o $(trace-obj-y) $(stub-obj-y) $(libcacard-y)
7
libcacard-lobj-y=$(patsubst %.o,%.lo,$(libcacard-obj-y))
8

    
9
# libtool will build the .o files, too
10
$(libcacard-obj-y): | $(libcacard-lobj-y)
11

    
12
all: libcacard.la libcacard.pc
13

    
14
vscclient$(EXESUF): libcacard/vscclient.o libcacard.la
15
	$(call LINK,$^)
16

    
17
#########################################################################
18
# Rules for building libcacard standalone library
19

    
20
libcacard.la: LDFLAGS += -rpath $(libdir) -no-undefined \
21
	-export-syms $(SRC_PATH)/libcacard/libcacard.syms
22
libcacard.la: LIBS += $(libcacard_libs)
23
libcacard.la: $(libcacard-lobj-y)
24
	$(call LINK,$^)
25

    
26
libcacard.pc: $(SRC_PATH)/libcacard/libcacard.pc.in
27
	$(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \
28
		-e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
29
	    -e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
30
		-e 's|@PREFIX@|$(prefix)|' $< > libcacard.pc,\
31
	"  GEN   $@")
32

    
33
.PHONY: install-libcacard
34

    
35
install: install-libcacard
36
install-libcacard: libcacard.pc libcacard.la
37
	$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
38
	$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
39
	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
40
	$(INSTALL_LIB) libcacard.la "$(DESTDIR)$(libdir)"
41
	$(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
42
	for inc in $(SRC_PATH)/libcacard/*.h; do \
43
		$(INSTALL_DATA) $$inc "$(DESTDIR)$(libcacard_includedir)"; \
44
	done