diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3c2e5cb --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +# Makefile for a simple C program + +# Compiler +CC = gcc + +# Compiler flags +CFLAGS = -g -Wall -std=c99 -pedantic + +# Source file +SRC = njvm.c + +# Executable name +TARGET = njvm + +# Default target +all: + $(CC) $(CFLAGS) -o $(TARGET) $(SRC) +# Clean up +clean: + rm -f $(OBJ) $(TARGET) + +run: all + ./$(TARGET)