libcacard: use per-target variable definitions

This lets the libcacard Makefile use more rules.mak magic.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2012-12-21 09:13:10 +01:00
parent 591eca679e
commit af0c8e9f3c

View File

@ -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