-
Notifications
You must be signed in to change notification settings - Fork 171
/
Makefile.in
76 lines (61 loc) · 2.12 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
CC=@CC@
SWIG=@SWIG@
PYDEV=@PYDEV@
PYLIB=@PYLIB@
SONAME=@SONAME@
FRAMEWORK=@FRAMEWORK@
BUILD=@BUILD@
LDFLAGS=@LDFLAGS@
CFLAGS=@CFLAGS@
LIBFTDI1=@LIBFTDI1@
prefix=@prefix@
exec_prefix=@exec_prefix@
LIBDIR=@libdir@
INCDIR=@includedir@
INC=-I$(PYDEV)
TARGET=mpsse
all: $(TARGET) py$(BUILD)-build
$(TARGET): mpsse.o fast.o
$(CC) $(CFLAGS) -shared -Wl,$(SONAME),lib$(TARGET).so $(TARGET).o fast.o support.o \
-o lib$(TARGET).so $(LDFLAGS)
ar rcs lib$(TARGET).a $(TARGET).o fast.o support.o
example-code:
make -C examples
mpsse.o: support.o
$(CC) $(CFLAGS) $(LDFLAGS) -DLIBFTDI1=$(LIBFTDI1) -c mpsse.c
fast.o: support.o
$(CC) $(CFLAGS) $(LDFLAGS) -c fast.c
support.o:
$(CC) $(CFLAGS) $(LDFLAGS) -DLIBFTDI1=$(LIBFTDI1) -c support.c
pyswig-build:
$(CC) $(CFLAGS) $(LDFLAGS) -DSWIGPYTHON -DLIBFTDI1=$(LIBFTDI1) -c support.c
$(CC) $(CFLAGS) $(LDFLAGS) -DSWIGPYTHON -DLIBFTDI1=$(LIBFTDI1) -c mpsse.c
$(SWIG) -python $(TARGET).i
$(CC) $(CFLAGS) -c -DLIBFTDI1=$(LIBFTDI1) $(TARGET)_wrap.c $(INC)
$(CC) $(CFLAGS) -shared $(FRAMEWORK) $(TARGET)_wrap.o mpsse.o support.o \
-o _pylib$(TARGET).so $(LDFLAGS) $(INC)
pyswig-install:
install -D -m644 pylib$(TARGET).py $(DESTDIR)/$(PYLIB)/pylib$(TARGET).py
install -D -m644 _pylib$(TARGET).so $(DESTDIR)/$(PYLIB)/_pylib$(TARGET).so
install -D -m644 $(TARGET).py $(DESTDIR)/$(PYLIB)/$(TARGET).py
pyswig-uninstall:
rm -f $(DESTDIR)/$(PYLIB)/$(TARGET).* \
$(DESTDIR)/$(PYLIB)/pylib$(TARGET).* \
$(DESTDIR)/$(PYLIB)/_pylib$(TARGET).*
# Dummy rules for when $BUILD == "" (if --disable-python was passed to ./configure)
py-build:
py-install:
py-uninstall:
install: py$(BUILD)-install
install -D -m644 lib$(TARGET).so $(DESTDIR)/$(LIBDIR)/lib$(TARGET).so
install -D -m644 lib$(TARGET).a $(DESTDIR)/$(LIBDIR)/lib$(TARGET).a
install -D -m644 $(TARGET).h $(DESTDIR)/$(INCDIR)/$(TARGET).h
uninstall: py$(BUILD)-uninstall
rm -f $(DESTDIR)/$(LIBDIR)/lib$(TARGET).so \
$(DESTDIR)/$(LIBDIR)/lib$(TARGET).a \
$(DESTDIR)/$(INCDIR)/$(TARGET).h
clean:
make -C examples clean
rm -rf *.o *.so *.a _$(TARGET).py* pylib$(TARGET).py* $(TARGET)_wrap.c *.pyc
distclean: clean
rm -rf *.cache config.* Makefile