[Python-checkins] r46566 - sandbox/trunk/decimal-c/Makefile

mateusz.rukowicz python-checkins at python.org
Tue May 30 21:07:52 CEST 2006


Author: mateusz.rukowicz
Date: Tue May 30 21:07:52 2006
New Revision: 46566

Modified:
   sandbox/trunk/decimal-c/Makefile
Log:
Now make debug produces module without -O3.


Modified: sandbox/trunk/decimal-c/Makefile
==============================================================================
--- sandbox/trunk/decimal-c/Makefile	(original)
+++ sandbox/trunk/decimal-c/Makefile	Tue May 30 21:07:52 2006
@@ -1,16 +1,24 @@
 # change PYTHON_25 to point to a 2.5 HEAD build
 # (a fairly recent HEAD is necessary)
-PYTHON_25=../../../python/python
+PYTHON_25=../../python/python
+PYTH_DIR=../../python
 
-all: module run
-module:
+all: _decimal.o _decimal.so run
+module: 
 	$(PYTHON_25) setup.py build
 	cp build/lib*/_decimal.so .
 clean:
 	rm -rf build/
-test: module
+	rm _decimal.o _decimal.so >& /dev/null
+test: _decimal.so
 	$(PYTHON_25) test_decimal.py
-run: module
-	$(PYTHON_25) -i -c "import _decimal; CD = _decimal.Decimal; import decimal; D = decimal.Decimal"
-debug: module
-	ddd $(PYTHON_25) 
+run: _decimal.so
+	$(PYTHON_25) -i run.py
+debug: _decimal.so
+	gdb $(PYTHON_25) 
+
+_decimal.o: _decimal.c decimal.h
+	gcc -pthread -fno-strict-aliasing -DNDEBUG -g -Wall -Wstrict-prototypes -fPIC -I${PYTH_DIR}/Include -I${PYTH_DIR} -c _decimal.c -o _decimal.o
+_decimal.so: _decimal.o
+	gcc -pthread -shared _decimal.o -o _decimal.so
+	


More information about the Python-checkins mailing list