Index: trunk/Makefile
===================================================================
--- trunk/Makefile	(revision 15)
+++ trunk/Makefile	(revision 26)
@@ -1,4 +1,5 @@
 TARGET_ARCH=-m32
 ASM=nasm
+CFLAGS=-masm=intel -Wall
 
 mioboot: mioboot.asm
@@ -17,5 +18,5 @@
 esercizio: esercizio.o
 
-pthreads-pc : LDFLAGS=-lrt
+pthreads-pc rw rw-nosync rw-mutex rw-rlotto: LDFLAGS=-lpthread
 
 pthreads-pc: pthreads-pc.c
@@ -33,4 +34,14 @@
 threads-tsl: threads-tsl.o enter.o
 
+threads-tsl-new: threads-tsl-new.c
+
+%.tex : %.nw
+	noweave -delay -filter btdefn -index -filter "awk -f lst.awk|tee debug" $< > $@
+
+%.c : %.nw
+	notangle -R$@ -filter btdefn $< > $@
+
+%.pdf : %.tex
+	pdflatex $< && pdflatex $< && pdflatex $<
 
 .PHONY: clean
