lc3-vm/Makefile

26 lines
813 B
Makefile
Raw Permalink Normal View History

2023-08-10 23:21:56 +00:00
CC = gcc
CFLAGS = -Wall -std=c99 -g
TARGET = lc3
2023-10-20 20:13:40 +00:00
#=mgen_start=#
target/$(TARGET): target/obj/ops.o target/obj/traps.o target/obj/main.o
@printf ':: Linking %s ... ' $(TARGET)
@$(CC) $(LDFLAGS) -o target/$(TARGET) target/obj/ops.o target/obj/traps.o target/obj/main.o $(LDLIBS)
@printf 'done\n'
2023-08-10 23:21:56 +00:00
2023-10-20 20:13:40 +00:00
target/obj/ops.o: ./src/ops.c ./src/main.h
@printf ':: Building ops.o ... '
@$(CC) $(CFLAGS) -o target/obj/ops.o -c ./src/ops.c
@printf 'done\n'
2023-08-10 23:21:56 +00:00
2023-10-20 20:13:40 +00:00
target/obj/traps.o: ./src/traps.c ./src/traps.h ./src/main.h
@printf ':: Building traps.o ... '
@$(CC) $(CFLAGS) -o target/obj/traps.o -c ./src/traps.c
@printf 'done\n'
2023-08-10 23:21:56 +00:00
2023-10-20 20:13:40 +00:00
target/obj/main.o: ./src/main.c ./src/main.h ./src/ops.h ./src/traps.h
@printf ':: Building main.o ... '
@$(CC) $(CFLAGS) -o target/obj/main.o -c ./src/main.c
@printf 'done\n'
#=mgen_end=#