Added a Makefile for better use

This commit is contained in:
nils polek 2024-01-14 13:47:08 +00:00
parent f5cab7c013
commit ffc04172ae

23
Makefile Normal file
View File

@ -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)