# Makefile for a simple C program # Compiler CC = gcc # 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)