document/improve makefile
This commit is contained in:
parent
441745d894
commit
984895a4f2
18
makefile
18
makefile
@ -1,19 +1,29 @@
|
|||||||
|
#-----------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
# choose shell
|
||||||
SHELL:=/bin/bash
|
SHELL:=/bin/bash
|
||||||
|
|
||||||
RAW = ../raw/
|
RAW = ../raw/
|
||||||
|
|
||||||
|
# directory names
|
||||||
SRC = src/
|
SRC = src/
|
||||||
LIB = lib/
|
LIB = lib/
|
||||||
|
|
||||||
|
# name of executable
|
||||||
EXE = eatraw
|
EXE = eatraw
|
||||||
|
|
||||||
|
# compiler and its options
|
||||||
CCC = g++ -std=c++11
|
CCC = g++ -std=c++11
|
||||||
OPT = -O3 -Wall -mavx -mno-tbm -mf16c -mno-f16c
|
OPT = -O3 -Wall -mavx -mno-tbm -mf16c -mno-f16c
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------#
|
||||||
|
# C++
|
||||||
|
|
||||||
# build executable
|
# build executable
|
||||||
$(EXE) : $(SRC)main.cpp $(LIB)raweat.hpp $(LIB)hexshow.hpp
|
$(EXE) : $(SRC)main.cpp $(LIB)raweat.hpp $(LIB)hexshow.hpp
|
||||||
$(CCC) $(OPT) $< -o $@
|
$(CCC) $(OPT) $< -o $@
|
||||||
|
|
||||||
|
# development version
|
||||||
eatdev : $(SRC)main_dev.cpp $(LIB)raweat.hpp
|
eatdev : $(SRC)main_dev.cpp $(LIB)raweat.hpp
|
||||||
$(CCC) $(OPT) $< -o $@
|
$(CCC) $(OPT) $< -o $@
|
||||||
|
|
||||||
@ -35,7 +45,7 @@ install : $(EXE)
|
|||||||
ifeq ($(chexe),)
|
ifeq ($(chexe),)
|
||||||
cp $(EXE) /usr/local/bin/
|
cp $(EXE) /usr/local/bin/
|
||||||
else
|
else
|
||||||
@echo "executable with same name already exists! choose different name!"
|
@echo "executable with name already exists! choose different name!"
|
||||||
@exit 1
|
@exit 1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -43,6 +53,9 @@ endif
|
|||||||
uninstall :
|
uninstall :
|
||||||
rm /usr/local/bin/$(EXE)
|
rm /usr/local/bin/$(EXE)
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------#
|
||||||
|
# Python
|
||||||
|
|
||||||
# build python module
|
# build python module
|
||||||
build : setup.py raw_eater.pyx raw_eater.pxd $(LIB)raweat.hpp
|
build : setup.py raw_eater.pyx raw_eater.pxd $(LIB)raweat.hpp
|
||||||
python3 setup.py build_ext --inplace
|
python3 setup.py build_ext --inplace
|
||||||
@ -56,3 +69,6 @@ py_clean :
|
|||||||
rm -f pyt/raw_eater.cpython-*.so
|
rm -f pyt/raw_eater.cpython-*.so
|
||||||
rm -f raw_eater.cpp
|
rm -f raw_eater.cpp
|
||||||
rm -rf build/
|
rm -rf build/
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user