[pypy-commit] stmgc default: Tweak the compilation.

arigo noreply at buildbot.pypy.org
Sun Jun 23 11:53:24 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r245:ec040cc165db
Date: 2013-06-23 10:37 +0200
http://bitbucket.org/pypy/stmgc/changeset/ec040cc165db/

Log:	Tweak the compilation.

diff --git a/.hgignore b/.hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -1,3 +1,5 @@
 syntax: glob
 *.pyc
 *~
+c4/build-demo*
+c4/debug-demo*
diff --git a/c4/Makefile b/c4/Makefile
--- a/c4/Makefile
+++ b/c4/Makefile
@@ -1,8 +1,9 @@
 #
-# Run with "make -jN" for maximum randomness.
+# Makefile for the demos.
 #
 
-debug: debug-demo1
+build: build-demo1 build-demo2 build-demo_random
+debug: debug-demo1 debug-demo2 debug-demo_random
 
 clean:
 	rm -f debug-demo1
@@ -18,8 +19,8 @@
 DEBUG = -g -DGC_NURSERY=0x10000  #-D_GC_DEBUG=1
 
 
-build-%: %.c ${H_FILES} ${C_FILES}
-	gcc -lrt -pthread -O2 -g $< -o $* -Wall ${C_FILES}
+build-%: %.c ${H_FILES} ${C_FILES} stmgc.c
+	gcc -lrt -pthread -O2 -g $< -o build-$* -Wall stmgc.c
 
 debug-%: %.c ${H_FILES} ${C_FILES}
 	gcc -lrt -pthread ${DEBUG} $< -o debug-$* -Wall ${C_FILES}
diff --git a/c4/stmgc.c b/c4/stmgc.c
new file mode 100644
--- /dev/null
+++ b/c4/stmgc.c
@@ -0,0 +1,13 @@
+/* This file is optional: it can be used to compile all .c files
+ * into one single big compilation unit.  You must compile either
+ * this, or individually the other .c files in this directory.
+ */
+
+#include "et.c"
+#include "lists.c"
+#include "steal.c"
+#include "nursery.c"
+#include "gcpage.c"
+#include "stmsync.c"
+#include "dbgmem.c"
+#include "fprintcolor.c"
diff --git a/duhton/Makefile b/duhton/Makefile
--- a/duhton/Makefile
+++ b/duhton/Makefile
@@ -1,11 +1,11 @@
 
 all: duhton_debug duhton
 
-duhton: *.c *.h stm/*.c stm/*.h
-	gcc -pthread -g -O2 -o duhton *.c stm/*.c -Wall
+duhton: *.c *.h ../c4/*.c ../c4/*.h
+	gcc -pthread -g -O2 -o duhton *.c ../c4/stmgc.c -Wall
 
-duhton_debug: *.c *.h stm/*.c stm/*.h
-	gcc -pthread -g -DDu_DEBUG -o duhton_debug *.c stm/*.c -Wall
+duhton_debug: *.c *.h ../c4/*.c ../c4/*.h
+	gcc -pthread -g -DDu_DEBUG -o duhton_debug *.c ../c4/stmgc.c -Wall
 
 clean:
 	rm -f duhton duhton_debug


More information about the pypy-commit mailing list