# Makefile to build a .so for LabVIEW

VERSION = 1.0

LIBFLAGS = -llabjackusb -lcin -llv -lc
CFLAGS += -m32 -I/usr/local/natinst/LabVIEW-2010/cintools
LIBTOOLFLAGS = -L/usr/local/natinst/LabVIEW-2010/cintools
LABJACKHEADERS = u6.o

%.o: %.c
	$(CC) $(CFLAGS) -c $<

TARGET = LabJackLabviewLibrary.so

all: $(TARGET)

$(TARGET): LabJackLabviewLibrary.o $(LABJACKHEADERS)
	$(CC) $(LIBTOOLFLAGS) -shared -Wl,-soname,LabJackLabviewLibrary.so -o $(TARGET) LabJackLabviewLibrary.o $(LABJACKHEADERS) $(LIBFLAGS)

clean:
	rm -f $(TARGET) *.o *~