Added a Makefile for better use
This commit is contained in:
parent
f5cab7c013
commit
ffc04172ae
23
Makefile
Normal file
23
Makefile
Normal 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)
|
||||||
Loading…
x
Reference in New Issue
Block a user