From 8cabdb9b7bc682949bcad2e90055a485aafad7a3 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Thu, 19 Nov 2020 23:49:25 +1030 Subject: interpreter works --- makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..7b21de5 --- /dev/null +++ b/makefile @@ -0,0 +1,25 @@ +TARGET = brainfuck +LIBS = +CC = gcc +CFLAGS = -std=c99 -g -Wextra -Wall -Werror -Wno-unused-variable -Wimplicit-fallthrough + +.PHONY: default all + +default: $(TARGET) +all: default + +OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c)) +HEADERS = $(wildcard *.h) + +%.o: %.c $(HEADERS) + $(CC) $(CFLAGS) -c $< -o $@ + +.PRECIOUS: $(TARGET) $(OBJECTS) + +$(TARGET): $(OBJECTS) + $(CC) $(OBJECTS) -Wall $(CFLAGS) $(LIBS) -o $@ + +clean: + -rm -f *.o + -rm -f *.tmp + -rm -f $(TARGET) -- cgit v1.2.3