Browse Source

Makefile, add targets: dist, dist-whl, dist-egg, install, install-prefix, install-sys

build-windows Release_2.1.0-RC2
heck 2 years ago
parent
commit
179a82f184
2 changed files with 38 additions and 8 deletions
  1. +31
    -4
      Makefile
  2. +7
    -4
      Makefile.conf

+ 31
- 4
Makefile View File

@ -1,14 +1,41 @@
include Makefile.conf
.PHONY: all build clean devenv envtest
.PHONY: all dist dist-egg dist-whl install install-prefix install-sys compile clean devenv envtest
all: build_ext
all: dist
build_ext:
python3 setup.py build_ext $(BUILD_EXT_OPTS)
# create wheel and egg package in dist/
dist: dist-whl dist-egg
# create wheel package in dist/
dist-whl: compile
python3 setup.py bdist_wheel
# create egg package in dist/
dist-egg: compile
python3 setup.py bdist_egg
# installs the package into the user home
install: compile
python3 setup.py install --force --user
# installs the package into PREFIX path
install-prefix: compile
python3 setup.py install --force $(PREFIX_OPT)
# installs the package system wide
install-sys: compile
python3 setup.py install --force
# build the module into build/
compile:
python3 setup.py build_ext $(DEBUG_OPT) $(PREFIX_OPT)
clean:
rm -r $(BUILD_DIR)
rm -r $(DIST_DIR)
devenv:
LD_LIBRARY_PATH=$(PREFIX)/lib \


+ 7
- 4
Makefile.conf View File

@ -1,15 +1,18 @@
HERE:=$(dir $(lastword $(MAKEFILE_LIST)))
# Defaults
# Constants
BUILD_DIR = ./build
DIST_DIR = ./dist
# Build config Defaults
DEBUG=0
PREFIX?=$(HOME)
BUILD_DIR = ./build
######### Overrides #########
-include $(HERE)local.conf
ifeq ($(DEBUG),1)
BUILD_EXT_OPTS+=--debug
DEBUG_OPT+=--debug
endif
BUILD_EXT_OPTS += --prefix=$(PREFIX)
PREFIX_OPT += --prefix=$(PREFIX)

Loading…
Cancel
Save