CC = gcc AM_CFLAGS = -I. -fPIC CFLAGS = -Wall -g -O2 progs := ncr-setkey libobj = ncrypto_fd.o ncrypto_generate_params.o ncrypto_key.o ncrypto_masterkey.o ncrypto_params.o ncrypto_session.o all: $(progs) libcryptodev.so ncr-setkey: setkey.c $(CC) $(AM_CFLAGS) $(CFLAGS) $< -o $@ libcryptodev.so: ${libobj} $(CC) $(AM_CFLAGS) $(CFLAGS) -shared -o libcryptodev.so.0.0 \ -Wl,-soname,libcryptodev.so.0 ${libobj} ln -sf libcryptodev.so.0.0 libcryptodev.so.0 ln -sf libcryptodev.so.0.0 libcryptodev.so $(libobj): linux/ncr.h ncrypto_internal.h linux/ncr.h: ../ncr.h mkdir -p linux cp $< linux/ncr.h clean: rm -rf *.o *~ libcryptodev.so* ncr-setkey linux .c.o: $(CC) $(AM_CFLAGS) $(CFLAGS) -c -o $@ $<