2017-08-02 20:10:36 +02:00
|
|
|
#-------------Makro-Part------------------
|
|
|
|
CC = gcc
|
2018-02-21 17:51:43 +01:00
|
|
|
CFLAGS = -Os -Wall -pedantic -std=c99
|
|
|
|
LDFLAGS = -static
|
2017-08-09 22:51:27 +02:00
|
|
|
DEBUG = -DNDEBUG
|
2017-08-02 20:10:36 +02:00
|
|
|
|
|
|
|
|
2017-10-03 03:03:45 +02:00
|
|
|
VPATH = src
|
2017-08-02 20:10:36 +02:00
|
|
|
#--------------Linker-Part-----------------
|
2017-10-04 23:59:35 +02:00
|
|
|
toy-CPU : main.o toy.o helper.o
|
2017-08-02 20:10:36 +02:00
|
|
|
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 $<
|
|
|
|
|
2017-09-20 15:59:31 +02:00
|
|
|
helper.o : helper.c helper.h
|
2017-08-02 20:10:36 +02:00
|
|
|
$(CC) $(DEBUG) $(CFLAGS) -o $@ -c $<
|
|
|
|
|
|
|
|
clean :
|
2017-08-09 22:51:27 +02:00
|
|
|
rm -f *.o coredump*.toy
|