libifd_egate.so: egate.o ifdhandler.o
	$(CC) -shared $(LDFLAGS) -o $@ egate.o ifdhandler.o -lusb

CFLAGS=-fPIC $(PCSC_CFLAGS) $(USB_CFLAGS) -g
LDFLAGS=$(PCSC_LDFLAGS) $(USB_LDFLAGS)

clean::
	-rm -f *.o *.so

install: libifd_egate.so
	mkdir -p /usr/local/pcsc/drivers/ifd-egate.bundle/Contents/Linux
	cp Info.plist /usr/local/pcsc/drivers/ifd-egate.bundle/Contents
	cp libifd_egate.so /usr/local/pcsc/drivers/ifd-egate.bundle/Contents/Linux

all: libifd_egate.so
