add bigint to execute
This commit is contained in:
48
Makefile
48
Makefile
@@ -1,43 +1,11 @@
|
||||
# Makefile for a simple C program
|
||||
build:
|
||||
gcc -g -Wall -Ibigint/build/include -o support.o -c support.c
|
||||
gcc -g -Wall -Ibigint/build/include -o njvm.o -c njvm.c
|
||||
gcc -g -Wall -Lbigint/build/lib -o njvm njvm.o support.o -lbigint
|
||||
|
||||
# Compiler
|
||||
CC = gcc
|
||||
run: build
|
||||
./njvm programs/prog1.bin
|
||||
|
||||
# program to Run
|
||||
F = programs/prog1.bin
|
||||
|
||||
# Compiler flags
|
||||
CFLAGS = -g -Wall -Ibigint/build/include
|
||||
|
||||
LDFLAGS = -g -Wall -Lbigint/build/lib
|
||||
|
||||
# Source file
|
||||
SRC = njvm.c
|
||||
|
||||
# Executable name
|
||||
TARGET = njvm
|
||||
|
||||
njvm.o:
|
||||
$(CC) $(CFLAGS) -o njvm.o -c njvm.c
|
||||
|
||||
support.o:
|
||||
$(CC) $(CFLAGS) -o support.o -c support.c
|
||||
|
||||
# Default target
|
||||
all: njvm.o support.o
|
||||
$(CC) $(LDFLAGS) -o $(TARGET) njvm.o support.o -lbigint
|
||||
# Clean up
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET)
|
||||
|
||||
debug: all
|
||||
./$(TARGET) --debug $(F)
|
||||
|
||||
run: all
|
||||
./$(TARGET) $(F)
|
||||
|
||||
nja: ./nja/nja$(V)
|
||||
./nja/nja$(V) $(IN) $(OUT)
|
||||
|
||||
njc: ./njc/njc$(V)
|
||||
./njc/njc$(V) $(IN) $(OUT)
|
||||
debug: build
|
||||
./njvm --debug prog.bin
|
||||
Reference in New Issue
Block a user