Commit 7b01d019 authored by Jerome Flesch's avatar Jerome Flesch
Browse files

Add Makefile



Signed-off-by: Jerome Flesch's avatarJerome Flesch <jflesch@openpaper.work>
parent 3f92c2d8
# If you want to build in MSYS2 on Windows
# export CMAKE_OPTS=-G "MSYS Makefiles"
build: build_py build_c
install: install_py install_c
uninstall: uninstall_py
build_py:
python3 ./setup.py build
build_c: build/libpillowfight.so
build/libpillowfight.so: build/CMakeLists.txt
(cd build && make -j4)
build/CMakeLists.txt:
mkdir -p build
(cd build && cmake ${CMAKE_OPTS} ..)
# TODO(Jflesch)
# src/pillowfight/version.h:
# git describe --always >| $@
clean:
rm -rf build dist *.egg-info
# TODO(Jflesch)
# rm -f src/pillowfight/version.h
install_py:
python3 ./setup.py install ${PIP_ARGS}
install_c:
(cd build && make install)
uninstall_py:
pip3 uninstall -y pypillowfight
help:
@echo "make build || make build_c || make build_py"
@echo "make help: display this message"
@echo "make install || make install_c || make install_py"
@echo "make uninstall || make uninstall_py"
.PHONY: help build install uninstall exe build_c build_py install_c install_py
......@@ -48,7 +48,10 @@ Development version :
```sh
$ git clone https://github.com/openpaperwork/libpillowfight.git
$ cd libpillowfight
$ sudo python3 ./setup.py install
# see 'make help' for details
$ make
$ sudo make install # will run python3 ./setup.py install + make install (CMake)
```
### Usage
......
#!/bin/sh
mkdir build
cd build
cmake -G "MSYS Makefiles" ..
make
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment