source: trunk/user/ksh/Makefile @ 438

Last change on this file since 438 was 427, checked in by alain, 7 years ago

Several processes KSH[i] can be launched by the INIT process.

File size: 1.8 KB
Line 
1#########################################################################
2# Makefile for the ALMOS-MKH "ksh" application on the TSAR architecture
3#########################################################################
4
5CC = mipsel-unknown-elf-gcc
6AS = mipsel-unknown-elf-as
7LD = mipsel-unknown-elf-ld
8DU = mipsel-unknown-elf-objdump
9AR = mipsel-unknown-elf-ar
10
11LIBS = ../../libs
12
13HAL  = ../../hal
14
15KERNEL = ../../kernel
16
17CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 -g -O2 \
18                 -fno-delete-null-pointer-checks -fomit-frame-pointer
19
20OBJS = ksh.o                    \
21       $(LIBS)/build/stdlib.o   \
22       $(LIBS)/build/stdio.o    \
23       $(LIBS)/build/string.o   \
24       $(LIBS)/build/malloc.o   \
25       $(LIBS)/build/pthread.o  \
26       $(LIBS)/build/hal_user.o
27       
28
29INCLUDES = -I. -I$(LIBS) -I$(KERNEL)/syscalls -I$(HAL)/generic
30
31ksh.elf : $(OBJS) ksh.ld
32        $(LD) -o $@ -T ksh.ld $(OBJS) 
33        $(DU) -D $@ > $@.txt
34
35ksh.o : ksh.c
36        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
37        $(DU) -D $@ > $@.txt
38
39$(LIBS)/build/hal_user.o : $(HAL)/tsar_mips32/core/hal_user.c $(HAL)/generic/hal_user.h
40        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
41        $(DU) -D $@ > $@.txt
42
43$(LIBS)/build/stdlib.o : $(LIBS)/stdlib.c $(LIBS)/stdlib.h
44        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
45        $(DU) -D $@ > $@.txt
46
47$(LIBS)/build/stdio.o : $(LIBS)/stdio.c $(LIBS)/stdio.h
48        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
49        $(DU) -D $@ > $@.txt
50
51$(LIBS)/build/string.o : $(LIBS)/string.c $(LIBS)/string.h
52        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
53        $(DU) -D $@ > $@.txt
54
55$(LIBS)/build/malloc.o : $(LIBS)/malloc.c $(LIBS)/malloc.h
56        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
57        $(DU) -D $@ > $@.txt
58
59$(LIBS)/build/pthread.o : $(LIBS)/pthread.c $(LIBS)/pthread.h
60        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
61        $(DU) -D $@ > $@.txt
62
63clean:
64        rm -f *.o *.elf *.txt core $(LIBS)/build/*.o $(LIBS)/build/*.txt
65
66
Note: See TracBrowser for help on using the repository browser.