comparison src/usr/Makefile @ 0:83c23a36980d

Init
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Fri, 26 May 2017 23:11:05 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:83c23a36980d
1 include ../makefile.inc
2
3 CFLAGS += -iquote ../
4 ASFLAGS += -I ../
5 ULIB = ulib.o usys.o printf.o umalloc.o
6
7 MKFS = ../tools/mkfs
8 FS_IMAGE = ../build/fs.img
9
10 UPROGS=\
11 _cat\
12 _echo\
13 _grep\
14 _init\
15 _kill\
16 _ln\
17 _ls\
18 _mkdir\
19 _rm\
20 _sh\
21 _stressfs\
22 _usertests\
23 _wc\
24 _zombie\
25 _hello\
26 _forktest\
27
28
29 all: $(FS_IMAGE)
30
31 _%: %.o $(ULIB)
32 $(LD) $(LDFLAGS) -N -e main -Ttext 0 -o $@ $^ -L ../ $(LIBGCC)
33 $(OBJDUMP) -S $@ > $*.asm
34 $(OBJDUMP) -t $@ | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > $*.sym
35
36 _forktest: forktest.o $(ULIB)
37 # forktest has less library code linked in - needs to be small
38 # in order to be able to max out the proc table.
39 $(LD) $(LDFLAGS) -N -e main -Ttext 0 -o _forktest forktest.o ulib.o usys.o
40 $(OBJDUMP) -S _forktest > forktest.asm
41
42 $(FS_IMAGE): $(MKFS) $(UPROGS)
43 $(MKFS) $@ $(UPROGS) UNIX
44 $(OBJDUMP) -S usys.o > usys.asm
45
46 clean:
47 rm -f *.o *.d *.asm *.sym $(FS_IMAGE) \
48 .gdbinit \
49 $(UPROGS)