Revision 992aeb8e libcacard/Makefile

b/libcacard/Makefile
1
-include ../config-host.mak
2
-include $(SRC_PATH)/rules.mak
3
-include $(SRC_PATH)/Makefile.objs
4

  
5 1
libcacard_includedir=$(includedir)/cacard
6 2

  
7
$(call set-vpath, $(SRC_PATH))
3
TOOLS += vscclient$(EXESUF)
8 4

  
9 5
# objects linked into a shared library, built with libtool with -fPIC if required
10 6
libcacard-obj-y=$(oslib-obj-y) error.o $(trace-obj-y) $(stub-obj-y) $(libcacard-y)
......
13 9
# libtool will build the .o files, too
14 10
$(libcacard-obj-y): | $(libcacard-lobj-y)
15 11

  
16
QEMU_CFLAGS+=-I../
12
all: libcacard.la libcacard.pc
17 13

  
18
vscclient: LIBS += $(libcacard_libs)
19
vscclient: vscclient.o $(libcacard-obj-y)
14
vscclient$(EXESUF): LIBS += $(libcacard_libs)
15
vscclient$(EXESUF): libcacard/vscclient.o $(libcacard-obj-y)
20 16
	$(call LINK,$^)
21 17

  
22
clean:
23
	rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo */*.lo .libs/* */.libs/* *.la */*.la *.pc
24
	rm -Rf .libs */.libs
25

  
26
all: libcacard.la libcacard.pc
27
# Dummy command so that make thinks it has done something
28
	@true
29

  
30 18
#########################################################################
31 19
# Rules for building libcacard standalone library
32 20

  
......
36 24
libcacard.la: $(libcacard-lobj-y)
37 25
	$(call LINK,$^)
38 26

  
39
libcacard_srcpath=$(SRC_PATH)/libcacard
40
libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
27
libcacard.pc: $(SRC_PATH)/libcacard/libcacard.pc.in
41 28
	$(call quiet-command,sed -e 's|@LIBDIR@|$(libdir)|' \
42 29
		-e 's|@INCLUDEDIR@|$(libcacard_includedir)|' \
43 30
	    -e 's|@VERSION@|$(shell cat $(SRC_PATH)/VERSION)|' \
44
		-e 's|@PREFIX@|$(prefix)|' \
45
		< $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc,\
31
		-e 's|@PREFIX@|$(prefix)|' $< > libcacard.pc,\
46 32
	"  GEN   $@")
47 33

  
48 34
.PHONY: install-libcacard
49 35

  
50
install-libcacard: libcacard.pc libcacard.la vscclient
36
install: install-libcacard
37
install-libcacard: libcacard.pc libcacard.la
51 38
	$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
52 39
	$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
53 40
	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
54
	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
55
	$(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
56 41
	$(INSTALL_LIB) libcacard.la "$(DESTDIR)$(libdir)"
57 42
	$(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
58
	for inc in *.h; do \
59
		$(INSTALL_DATA) $(libcacard_srcpath)/$$inc "$(DESTDIR)$(libcacard_includedir)"; \
43
	for inc in $(SRC_PATH)/libcacard/*.h; do \
44
		$(INSTALL_DATA) $$inc "$(DESTDIR)$(libcacard_includedir)"; \
60 45
	done

Also available in: Unified diff