makefile generated by mgen
This commit is contained in:
parent
42b2e0b84e
commit
73c98d7ff4
2 changed files with 18 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
target
|
target
|
||||||
tutorial
|
|
||||||
|
|
30
Makefile
30
Makefile
|
@ -1,19 +1,25 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -Wall -std=c99 -g
|
CFLAGS = -Wall -std=c99 -g
|
||||||
LDFLAGS =
|
|
||||||
TARGET = lc3
|
TARGET = lc3
|
||||||
|
|
||||||
$(TARGET): target/obj/main.o target/obj/ops.o target/obj/traps.o
|
#=mgen_start=#
|
||||||
$(CC) -o target/bin/$(TARGET) target/obj/main.o target/obj/ops.o target/obj/traps.o $(LDFLAGS)
|
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'
|
||||||
|
|
||||||
target/obj/main.o: src/main.c src/main.h src/ops.h src/traps.h
|
target/obj/ops.o: ./src/ops.c ./src/main.h
|
||||||
$(CC) $(CFLAGS) -o target/obj/main.o -c src/main.c
|
@printf ':: Building ops.o ... '
|
||||||
|
@$(CC) $(CFLAGS) -o target/obj/ops.o -c ./src/ops.c
|
||||||
|
@printf 'done\n'
|
||||||
|
|
||||||
target/obj/ops.o: src/ops.c src/main.h src/ops.h
|
target/obj/traps.o: ./src/traps.c ./src/traps.h ./src/main.h
|
||||||
$(CC) $(CFLAGS) -o target/obj/ops.o -c src/ops.c
|
@printf ':: Building traps.o ... '
|
||||||
|
@$(CC) $(CFLAGS) -o target/obj/traps.o -c ./src/traps.c
|
||||||
|
@printf 'done\n'
|
||||||
|
|
||||||
target/obj/traps.o: src/traps.c src/main.h src/traps.h
|
target/obj/main.o: ./src/main.c ./src/main.h ./src/ops.h ./src/traps.h
|
||||||
$(CC) $(CFLAGS) -o target/obj/traps.o -c src/traps.c
|
@printf ':: Building main.o ... '
|
||||||
|
@$(CC) $(CFLAGS) -o target/obj/main.o -c ./src/main.c
|
||||||
run: $(TARGET)
|
@printf 'done\n'
|
||||||
./target/bin/$(TARGET)
|
#=mgen_end=#
|
||||||
|
|
Loading…
Reference in a new issue