Last change
on this file since 418 was
417,
checked in by alain, 7 years ago
|
Introduce sort and pgcd applications.
|
File size:
1.5 KB
|
Rev | Line | |
---|
[417] | 1 | ############################################################################ |
---|
| 2 | # Makefile for the ALMOS-MKH "pgcd" application on the TSAR architecture |
---|
| 3 | ############################################################################ |
---|
| 4 | |
---|
| 5 | CC = mipsel-unknown-elf-gcc |
---|
| 6 | AS = mipsel-unknown-elf-as |
---|
| 7 | LD = mipsel-unknown-elf-ld |
---|
| 8 | DU = mipsel-unknown-elf-objdump |
---|
| 9 | AR = mipsel-unknown-elf-ar |
---|
| 10 | |
---|
| 11 | LIBS = ../../libs |
---|
| 12 | |
---|
| 13 | HAL = ../../hal |
---|
| 14 | |
---|
| 15 | KERNEL = ../../kernel |
---|
| 16 | |
---|
| 17 | CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 \ |
---|
| 18 | -fno-delete-null-pointer-checks -fomit-frame-pointer |
---|
| 19 | |
---|
| 20 | OBJS = pgcd.o \ |
---|
| 21 | $(LIBS)/build/stdlib.o \ |
---|
| 22 | $(LIBS)/build/nostdio.o \ |
---|
| 23 | $(LIBS)/build/stdio.o \ |
---|
| 24 | $(LIBS)/build/hal_user.o |
---|
| 25 | |
---|
| 26 | INCLUDES = -I. -I$(LIBS) -I$(KERNEL)/syscalls -I$(HAL)/generic |
---|
| 27 | |
---|
| 28 | pgcd.elf : $(OBJS) pgcd.ld |
---|
| 29 | $(LD) -o $@ -T pgcd.ld $(OBJS) |
---|
| 30 | $(DU) -D $@ > $@.txt |
---|
| 31 | |
---|
| 32 | pgcd.o : pgcd.c |
---|
| 33 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
| 34 | $(DU) -D $@ > $@.txt |
---|
| 35 | |
---|
| 36 | $(LIBS)/build/hal_user.o : $(HAL)/tsar_mips32/core/hal_user.c $(HAL)/generic/hal_user.h |
---|
| 37 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
| 38 | $(DU) -D $@ > $@.txt |
---|
| 39 | |
---|
| 40 | $(LIBS)/build/stdlib.o : $(LIBS)/stdlib.c $(LIBS)/stdlib.h |
---|
| 41 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
| 42 | $(DU) -D $@ > $@.txt |
---|
| 43 | |
---|
| 44 | $(LIBS)/build/stdio.o : $(LIBS)/stdio.c $(LIBS)/stdio.h |
---|
| 45 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
| 46 | $(DU) -D $@ > $@.txt |
---|
| 47 | |
---|
| 48 | $(LIBS)/build/nostdio.o : $(LIBS)/nostdio.c $(LIBS)/nostdio.h |
---|
| 49 | $(CC) $(INCLUDES) $(CFLAGS) -c -o $@ $< |
---|
| 50 | $(DU) -D $@ > $@.txt |
---|
| 51 | |
---|
| 52 | clean: |
---|
| 53 | rm -f *.o *.elf *.txt core $(LIBS)/build/*.o $(LIBS)/build/*.txt |
---|
Note: See
TracBrowser
for help on using the repository browser.