aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-12-03 03:40:41 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-12-03 03:40:41 +0000
commit0f0862245f0a73c589116eb401b0eeaab5c5e780 (patch)
tree91c8d893517f8ef0ea441b1ca67d0138509b1d37 /Makefile
parenta135262cd8eed85df769a7dbace73a886af7d6df (diff)
downloadobf-0f0862245f0a73c589116eb401b0eeaab5c5e780.tar.gz
obf-0f0862245f0a73c589116eb401b0eeaab5c5e780.tar.bz2
obf-0f0862245f0a73c589116eb401b0eeaab5c5e780.zip
Build two executables: obi and obc
The names stand for Oreo's Brainfuck Interpreter and Oreo's Brainfuck Compiler, separate tasks that shouldn't be packaged in one executable.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index b96aaa9..c805acf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,4 @@
CC=gcc
-OUT=obf.out
LIBS=
ARGS=
@@ -14,15 +13,19 @@ CFLAGS=$(GFLAGS) $(DFLAGS)
endif
.PHONY: all
-all: $(OUT)
+all: obi.out obc.out
-$(OUT): lib.c parser.c main.c
+obi.out: lib.c parser.c obi.c
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
+obc.out: lib.c parser.c assembler.c obc.c
+ $(CC) $(CFLAGS) $^ -o $@ $(LIBS)
+
+OUT=
.PHONY: run
run: $(OUT)
./$^ $(ARGS)
.PHONY:
clean:
- rm -v $(OUT)
+ rm -v *.out *.o