source: soft/tp8/correction/Makefile @ 8

Last change on this file since 8 was 7, checked in by alain, 14 years ago

fichiers tp12

File size: 685 bytes
Line 
1LD=mipsel-unknown-elf-ld
2CC=mipsel-unknown-elf-gcc
3AS=mipsel-unknown-elf-as
4DU=mipsel-unknown-elf-objdump
5
6OBJS= reset.o   \
7          giet.o        \
8          stdio.o       \
9          drivers.o     \
10          main.o
11
12CFLAGS= -Wall -ffreestanding -fomit-frame-pointer -mips32 -ggdb
13ifeq ($(GIET),)
14$(error "You must define $$(GIET)")
15endif
16
17bin.soft: $(OBJS) ldscript
18        $(LD) -o $@ -T ldscript $(OBJS)
19        $(DU) -D $@ > $@.txt
20
21reset.o: reset.s
22        $(AS) -g -mips32 -o $@ $<
23giet.o: $(GIET)/giet.s
24        $(AS) -g -mips32 -o $@ $<
25
26drivers.o: $(GIET)/drivers.c
27        $(CC) $(CFLAGS) -c -o $@ $<
28stdio.o: $(GIET)/stdio.c
29        $(CC) $(CFLAGS) -c -o $@ $<
30
31main.o: main.c
32        $(CC) $(CFLAGS) -I$(GIET) -c -o $@ $<
33
34clean:
35        rm -f *.o bin.soft *.txt core *~
36
Note: See TracBrowser for help on using the repository browser.