forked from NeuroNetMem/PythonPlugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.OSX
More file actions
33 lines (18 loc) · 688 Bytes
/
Copy pathMakefile.OSX
File metadata and controls
33 lines (18 loc) · 688 Bytes
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
SUBDIRS = spwfinder pulse_test_delay signal_plot multiprocessing_plugin
.PHONY: clean
subdirs: $(SUBDIRS)
% :: %/%.so FORCE
FORCE:
spwfinder: spwfinder/spwfinder.so
%.so: %.o
gcc -g -O2 -shared -o $@ $< -L`python3-config --prefix`/lib `python3-config --ldflags | sed 's/-Wl,-stack_size,1000000//'`
install_name_tool -change libpython3.5m.dylib `python3-config --prefix`/lib/libpython3.5m.dylib $@
%.o: %.c
gcc -g -O2 -fpic -DWITH_THREAD=1 -c $< -o $@ `python3-config --includes` -I`python -c "import numpy; print(numpy.get_include())"`
%.c: %.pyx plugin.pyx
cython -3 $<
clean:
for dir in $(SUBDIRS) ; do \
rm $$dir/$$dir.c \
$$dir/$$dir.h \
$$dir/$$dir.so; done