# HG changeset patch # User telesto # Date 1681498940 -7200 # Fri Apr 14 21:02:20 2023 +0200 # Node ID 211cadd06e86b1c71c029a650e8c45ca3ea504a7 # Parent baca9b2120ab49d412f61a9a9230397c207a27bf Makefile: targets will now be build when source files changed diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -22,37 +22,42 @@ 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 diff --git a/mandelbrot.fox b/mandelbrot.fox --- a/mandelbrot.fox +++ b/mandelbrot.fox @@ -203,4 +203,3 @@ " mandelbrot.o" write-obj -