Patchwork [10/27] libcacard: use per-target variable definitions

login
register
mail settings
Submitter Paolo Bonzini
Date Dec. 21, 2012, 4:05 p.m.
Message ID <1356105948-13216-11-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/207841/
State New
Headers show

Comments

Paolo Bonzini - Dec. 21, 2012, 4:05 p.m.
This lets the libcacard Makefile use more rules.mak magic.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 libcacard/Makefile |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

Patch

diff --git a/libcacard/Makefile b/libcacard/Makefile
index ddab5d8..7fc6a06 100644
--- a/libcacard/Makefile
+++ b/libcacard/Makefile
@@ -15,8 +15,9 @@  $(libcacard-obj-y): | $(libcacard-lobj-y)
 
 QEMU_CFLAGS+=-I../
 
+vscclient: LIBS += $(libcacard_libs)
 vscclient: vscclient.o $(libcacard-obj-y)
-	$(call quiet-command,$(CC) -o $@ $^ $(libcacard_libs) $(LIBS),"  LINK  $@")
+	$(call LINK,$^)
 
 clean:
 	rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~ vscclient *.lo */*.lo .libs/* */.libs/* *.la */*.la *.pc
@@ -29,8 +30,10 @@  all: libcacard.la libcacard.pc
 #########################################################################
 # Rules for building libcacard standalone library
 
+libcacard.la: LDFLAGS += -rpath $(libdir) -no-undefined
+libcacard.la: LIBS += $(libcacard_libs)
 libcacard.la: $(libcacard-lobj-y)
-	$(call quiet-command,$(LIBTOOL) --mode=link --tag=CC $(CC) -rpath $(libdir) -o $@ $^ $(libcacard_libs),"  lt LINK $@")
+	$(call LINK,$^)
 
 libcacard_srcpath=$(SRC_PATH)/libcacard
 libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in