source: trunk/user/init/Makefile @ 435

Last change on this file since 435 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
RevLine 
[427]1#########################################################################
2# Makefile for the ALMOS-MKH "init" 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 = init.o                    \
21       $(LIBS)/build/stdlib.o    \
22       $(LIBS)/build/stdio.o     \
23       $(LIBS)/build/pthread.o   \
24       $(LIBS)/build/malloc.o    \
25       $(LIBS)/build/hal_user.o
26
27INCLUDES = -I.                   \
28           -I../..               \
29           -I$(LIBS)/            \
30           -I$(KERNEL)/syscalls  \
31           -I$(HAL)/generic
32
33init.elf : $(OBJS) init.ld
34        $(LD) -o $@ -T init.ld $(OBJS) 
35        $(DU) -D $@ > $@.txt
36
37init.o : init.c
38        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
39        $(DU) -D $@ > $@.txt
40
41$(LIBS)/build/hal_user.o : $(HAL)/tsar_mips32/core/hal_user.c $(HAL)/generic/hal_user.h
42        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
43        $(DU) -D $@ > $@.txt
44
45$(LIBS)/build/stdlib.o : $(LIBS)/stdlib.c $(LIBS)/stdlib.h
46        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
47        $(DU) -D $@ > $@.txt
48
49$(LIBS)/build/stdio.o : $(LIBS)/stdio.c $(LIBS)/stdio.h
50        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
51        $(DU) -D $@ > $@.txt
52
53$(LIBS)/build/pthread.o : $(LIBS)/pthread.c $(LIBS)/pthread.h
54        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
55        $(DU) -D $@ > $@.txt
56
57$(LIBS)/build/malloc.o : $(LIBS)/malloc.c $(LIBS)/malloc.h
58        $(CC) $(INCLUDES) $(CFLAGS) -c -o  $@ $<
59        $(DU) -D $@ > $@.txt
60
61
62
63clean:
64        rm -f *.o *.elf *.txt core $(LIBS)/build/*.o $(LIBS)/build/*.txt
Note: See TracBrowser for help on using the repository browser.