litex/misoclib/com/liteusb/software/ftdi/linux/Makefile
Florent Kermarrec da0fe2ecfb liteusb: refactor software (use python instead of libftdicom in C) and provide simple example.
small modifications to fastftdi.c are also done to select our interface (A or B) and mode (synchronous, asynchronous)
2015-05-01 16:22:26 +02:00

35 lines
579 B
Makefile

UNAME := $(shell uname)
LIBNAME := libftdicom
# Load libusb via pkg-config
PACKAGES := libusb-1.0
CFLAGS += $(shell pkg-config --cflags $(PACKAGES))
LDFLAGS += $(shell pkg-config --libs $(PACKAGES))
# Large file support
CFLAGS += $(shell getconf LFS_CFLAGS)
CFLAGS += -fPIC
SO := $(LIBNAME).so
SO_LDFLAGS := $(LDFLAGS) -shared
# Local headers
CFLAGS += -I../include
SO_OBJS := ../fastftdi.o
CFLAGS += -O3 -g --std=c99
all: $(SO)
cp libftdicom.so ../libftdicom.so
$(SO): $(SO_OBJS)
cc -o $@ $^ $(SO_LDFLAGS)
*.o: *.h Makefile
clean:
rm -f $(SO) $(OBJS) $(SO_OBJS)