emulator/makefile

25 lines
521 B
Makefile
Raw Normal View History

2017-08-02 20:10:36 +02:00
#-------------Makro-Part------------------
CC = gcc
2017-08-09 22:51:27 +02:00
CFLAGS = -Wall -pedantic -std=c99
2017-08-02 20:10:36 +02:00
LDFLAGs =
2017-08-09 22:51:27 +02:00
DEBUG = -DNDEBUG
2017-08-02 20:10:36 +02:00
VPATH = src src/debug
#--------------Linker-Part-----------------
toy_cpu : main.o toy.o debug.o
echo $@ is now linked
$(CC) $(LDFLAGS) -o $@ $^
#--------------Compiler-Part---------------
main.o : main.c
$(CC) $(DEBUG) $(CFLAGS) -o $@ -c $<
toy.o : toy.c toy.h
$(CC) $(DEBUG) $(CFLAGS) -o $@ -c $<
debug.o : debug.c debug.h
$(CC) $(DEBUG) $(CFLAGS) -o $@ -c $<
clean :
2017-08-09 22:51:27 +02:00
rm -f *.o coredump*.toy