diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-03 04:30:26 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-12-03 04:31:40 +0000 |
commit | 423f34ba457f41f01a8cda470b8e15e2d7089bb1 (patch) | |
tree | 775429512df71c108f5bcb3260b95d0f0c592b8d /Makefile | |
parent | b058becb925f480962f0dc23c307528f5f21838f (diff) | |
download | obf-423f34ba457f41f01a8cda470b8e15e2d7089bb1.tar.gz obf-423f34ba457f41f01a8cda470b8e15e2d7089bb1.tar.bz2 obf-423f34ba457f41f01a8cda470b8e15e2d7089bb1.zip |
Added Make recipes for examples
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -22,10 +22,19 @@ obc.out: lib.c parser.c assembler.c obc.c $(CC) $(CFLAGS) $^ -o $@ $(LIBS) OUT= -.PHONY: run +.PHONY: run clean examples-interpreter examples-compiler run: $(OUT) ./$^ $(ARGS) -.PHONY: +EXAMPLES=$(wildcard examples/*.bf) + +examples: examples-interpreter examples-compiler + +examples-interpreter: + $(foreach x, $(EXAMPLES), $(MAKE) run OUT=obi.out ARGS=$(x);) + +examples-compiler: + $(foreach x, $(EXAMPLES), $(MAKE) run OUT=obc.out ARGS=$(x) && ./a.out;) + clean: rm -v *.out *.o *.asm |