Skip to content

Commit

Permalink
Update makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Kautenja authored Jun 16, 2020
1 parent 6d037a6 commit eef4a5f
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,45 +1,27 @@
# an alias to the python command
PYTHON=python3

# build the LaiNES code, test the Python interface, and build
# the deployment package
# build everything
all: test deployment

#
# MARK: Development
#

# build the LaiNES CPP code
lib_nes_env:
scons -C nes_py/nes
mv nes_py/nes/lib_nes_env*.so nes_py

# run the Python test suite
test: lib_nes_env
${PYTHON} -m unittest discover .
python3 -m unittest discover .

#
# MARK: Deployment
#

clean_dist:
# clean the build directory
clean:
rm -rf build/ dist/ .eggs/ *.egg-info/ || true

clean_python_build:
find . -name "*.pyc" -delete
find . -name "__pycache__" -delete

clean_cpp_build:
find . -name ".sconsign.dblite" -delete
find . -name "build" | rm -rf
find . -name "lib_nes_env.so" -delete

# clean the build directory
clean: clean_dist clean_python_build clean_cpp_build

# build the deployment package
deployment: clean
${PYTHON} setup.py sdist bdist_wheel
python3 setup.py sdist bdist_wheel

# ship the deployment package to PyPi
ship: test deployment
Expand Down

0 comments on commit eef4a5f

Please sign in to comment.