Add clean target
authorBen Dudson <bd512@york.ac.uk>
Wed, 3 Jan 2018 15:43:22 +0000 (15:43 +0000)
committerBen Dudson <bd512@york.ac.uk>
Wed, 3 Jan 2018 15:43:22 +0000 (15:43 +0000)
Deletes executables and object files

nasm/Makefile

index 9ec65de..bb690ea 100644 (file)
@@ -3,6 +3,7 @@ STEPS = step0_repl step1_read_print step2_eval step3_env step4_if_fn_do step5_tc
 
 COMPONENTS = env.asm core.asm reader.asm printer.asm types.asm system.asm exceptions.asm
 
+
 all: $(STEPS)
 
 %.o: %.asm $(COMPONENTS)
@@ -11,6 +12,10 @@ all: $(STEPS)
 %: %.o
        ld -o $@ $<
 
+.PHONY: clean
+clean:
+       rm -f $(STEPS) $(STEPS:%=%.o)
+
 ######################
 
 SOURCES_BASE = reader.asm printer.asm types.asm system.asm exceptions.asm