24 lines
297 B
Makefile
24 lines
297 B
Makefile
# 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)
|