Statistics
| Branch: | Revision:

root / libcacard / Makefile @ 992aeb8e

History | View | Annotate | Download (1.6 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): LIBS += $(libcacard_libs)
15
vscclient$(EXESUF): libcacard/vscclient.o $(libcacard-obj-y)
16
	$(call LINK,$^)
17

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

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

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

    
34
.PHONY: install-libcacard
35

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