File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
source-code/cython/Primes Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change 11VERSION = $(shell python3-config --extension-suffix)
2- PRIMES_LIBS = primes_cython.$(VERSION ) .so primes_cython3.$(VERSION ) .so \
3- primes_pure_python.$(VERSION ) .so primes_pure_malloc.$(VERSION ) .so \
4- primes_malloc.$(VERSION ) .so
2+ SRC_FILES = primes_cython.pyx \
3+ primes_malloc.pyx \
4+ primes_pure_python.py \
5+ primes_pure_malloc.py
6+ PRIMES_LIBS = $(addsuffix $(VERSION ) , $(basename $(SRC_FILES ) ) )
7+ C_FILES = $(addsuffix .c, $(basename $(SRC_FILES ) ) )
58
69all : $(PRIMES_LIBS )
710
8- $(PRIMES_LIBS ) : primes_cython.pyx primes_pure_python.py
11+ % $(VERSION ) : % .pyx
12+ python setup.py build_ext --inplace
13+
14+ % $(VERSION ) : % .py
915 python setup.py build_ext --inplace
1016
1117clean :
1218 python setup.py clean
13- $(RM ) primes_cython.c primes_cython3.c primes_pure_python.c primes_malloc.c $(PRIMES_LIBS )
19+ $(RM ) $(PRIMES_LIBS )
20+ $(RM ) $(C_FILES )
1421 $(RM ) -r build/
You can’t perform that action at this time.
0 commit comments