Makefile: targets will now be build when source files changed
2 files changed, 28 insertions(+), 24 deletions(-)

M Makefile
M mandelbrot.fox
M Makefile +28 -23
@@ 22,37 22,42 @@ bootstrap2: bootstrap.o bootstrap2.o
 swapwm-config.fox: 
 			cp swapwm-config.def.fox swapwm-config.fox
 
-swapwm.o: fox swapwm-config.fox
-			# replace no-debug.fox with debug.fox to see debug output
-			cat system.fox fileio.fox no-debug.fox elf64.fox \
-			bootstrap2.fox fileio.fox buf.fox swapwm-config.fox swapwm.fox bye.fox | ./fox
+# replace no-debug.fox with debug.fox to see debug output
+srcs-swapwm = system.fox fileio.fox no-debug.fox elf64.fox \
+			bootstrap2.fox fileio.fox buf.fox \
+			swapwm-config.fox swapwm.fox bye.fox
+swapwm.o: fox $(srcs-swapwm)
+			cat $(srcs-swapwm) | ./fox
 
-mandelbrot.o: fox
-			cat system.fox fileio.fox elf64.fox \
-			bootstrap2.fox fileio.fox mandelbrot.fox bye.fox | ./fox
+srcs-mandelbrot = system.fox fileio.fox elf64.fox bootstrap2.fox \
+			fileio.fox mandelbrot.fox bye.fox
+mandelbrot.o: fox $(srcs-mandelbrot)
+			cat $(srcs-mandelbrot) | ./fox
 
-mandelbrot-asm.o: fox
-			cat system.fox fileio.fox asm.fox elf64.fox \
+srcs-mandelbrot-asm = system.fox fileio.fox elf64.fox asm.fox \
 			bootstrap2.fox fileio.fox malloc.fox \
-			mandelbrot-asm.fox bye.fox | ./fox
+			mandelbrot-asm.fox bye.fox
+mandelbrot-asm.o: fox $(srcs-mandelbrot-asm)
+			cat $(srcs-mandelbrot-asm) | ./fox
 
-mandelbrot-mt.o: fox
-			cat system.fox fileio.fox asm.fox elf64.fox \
+srcs-mandelbrot-mt = system.fox fileio.fox elf64.fox asm.fox \
 			bootstrap2.fox fileio.fox malloc.fox \
-			thread.fox mandelbrot-mt.fox bye.fox | ./fox
+			thread.fox mandelbrot-mt.fox bye.fox
+mandelbrot-mt.o: fox $(srcs-mandelbrot-mt)
+			cat $(srcs-mandelbrot-mt) | ./fox
 
-avx.o: fox
-			cat system.fox fileio.fox elf64.fox \
-			bootstrap2.fox avx.fox bye.fox | ./fox
-
-foxx.o: fox
-			cat system.fox asm.fox fileio.fox elf64.fox \
-			bootstrap2.fox foxx.fox bye.fox | ./fox
+srcs-avx = system.fox fileio.fox elf64.fox bootstrap2.fox avx.fox \
+			bye.fox
+avx.o: fox $(srcs-avx)
+			cat $(srcs-avx) | ./fox
+			
+srcs-foxx = system.fox asm.fox fileio.fox elf64.fox \
+			bootstrap2.fox foxx.fox	bye.fox
+foxx.o: fox $(srcs-foxx)
+			cat $(srcs-foxx) | ./fox
 
 clean:
 			rm -f *.o fox bootstrap2 swapwm mandelbrot avx \
 			mandelbrot-mt mandelbrot-asm mandelbrot foxx
 
-.PHONY: all clean mandelbrot2.o
-
-
+.PHONY: all clean mandelbrot2.o bootstrap2.o

          
M mandelbrot.fox +0 -1
@@ 203,4 203,3 @@ start-with mb
 
 " mandelbrot.o" write-obj
 
-