forked from jordens/libsmartpen
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
34 lines (24 loc) · 1003 Bytes
/
Makefile
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
# vim: set noet sw=8 :
LOCAL_CFLAGS=-Wall -fPIC `pkg-config --cflags python3 glib-2.0 openobex libusb-1.0` -g
export PKG_CONFIG_PATH=$(HOME)/sandboxes/openobex/lib/pkgconfig
all: libsmartpen.so pysmartpen.so
%.o: %.c
gcc -o $@ -c $^ $(CFLAGS) $(LOCAL_CFLAGS)
libsmartpen.so: smartpen.o
gcc -o $@ -shared $^ `pkg-config --libs glib-2.0 openobex libusb-1.0`
pysmartpen.so: smartpen.o pysmartpen.o
gcc -o $@ -shared $^ `pkg-config --libs glib-2.0 openobex libusb-1.0`
pysmartpen.c: pysmartpen.pyx
cython -3 -a $^
obex: test.o smartpen.o
gcc -o $@ $^ `pkg-config --libs glib-2.0 openobex libusb-1.0` -L. -lsmartpen
.PHONY: install clean
clean:
rm -f libsmartpen.so pysmartpen.so *.o pysmartpen.c
install: libsmartpen.so
if [ "x${LIBDIR}" = "x" ]; then \
install -m755 -D libsmartpen.so $(DESTDIR)/usr/lib/libsmartpen.so; \
else \
install -m755 -D libsmartpen.so $(DESTDIR)$(LIBDIR)/libsmartpen.so; \
fi;
install -m644 -D 75-smartpen.rules $(DESTDIR)/lib/udev/rules.d/75-smartpen.rules