diff --git a/build-windows/pEpPythonAdapter.vcxproj b/build-windows/pEpPythonAdapter.vcxproj
index 66ee151..cf75a0a 100644
--- a/build-windows/pEpPythonAdapter.vcxproj
+++ b/build-windows/pEpPythonAdapter.vcxproj
@@ -63,7 +63,7 @@
- nmake /F "$(ProjectDir)..\make.mak" all
+ nmake /F "$(ProjectDir)..\make.mak" debug
WIN32;_DEBUG;_DLL;$(NMakePreprocessorDefinitions)
@@ -76,7 +76,7 @@
_DEBUG;$(NMakePreprocessorDefinitions)
- nmake /F "$(ProjectDir)..\make.mak" all
+ nmake /F "$(ProjectDir)..\make.mak" release
WIN32;NDEBUG;_DLL;$(NMakePreprocessorDefinitions)
diff --git a/make.mak b/make.mak
index 9dfc3af..721704d 100644
--- a/make.mak
+++ b/make.mak
@@ -16,12 +16,24 @@ dist-egg: compile
# build the module into build
compile:
CD..
- PY -3.8-32 setup.py build_ext
+ PY -3.8-32 setup.py build_ext --debug
# delete output directories
clean:
- @if exist $(BUILD_DIR) rmdir /S /Q $(BUILD_DIR)
- @if exist $(DIST_DIR) rmdir /S /Q $(DIST_DIR)
+ @if exist $(BUILD_DIR) rmdir /S /Q $(BUILD_DIR)
+ @if exist $(DIST_DIR) rmdir /S /Q $(DIST_DIR)
# create directories and build application
-all: clean dist
+all: clean dist
+
+# release build
+release: clean
+ CD..
+ PY -3.8-32 setup.py build_ext
+ PY -3.8-32 setup.py bdist_wheel
+
+#debug build
+debug: clean
+ CD..
+ PY -3.8-32 setup.py build_ext --debug
+ PY -3.8-32 setup.py bdist_wheel
diff --git a/setup.py b/setup.py
index e1e8136..fb9889c 100755
--- a/setup.py
+++ b/setup.py
@@ -70,9 +70,8 @@ class BuildExtCommand(build_ext):
sys_includes = [
join(inst_prefix),
] + [d[1] for d in self.windowsGetBoostDirs()]
- sys_libdirs = [
- join(inst_prefix, 'Release')
- ] + [d[0] for d in self.windowsGetBoostDirs()]
+ sys_libdirs = [ join(inst_prefix, 'Debug')] if self.debug else [ join(inst_prefix, 'Release')]
+ sys_libdirs += [d[0] for d in self.windowsGetBoostDirs()]
libs = [
'pEpEngine',
'libpEpAdapter',
@@ -82,7 +81,7 @@ class BuildExtCommand(build_ext):
compile_flags = ['/std:c++14', '/permissive']
if self.debug:
pEpLog("debug mode")
- compile_flags += ['/O0', '/g', '/UNDEBUG']
+ compile_flags += ['/Od', '/Zi', '/DEBUG']
return (home, sys_includes, sys_libdirs, libs, compile_flags)