0
|
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\
|
13
|
27 _dummy
|
|
28
|
11
|
29 # _check\
|
0
|
30
|
|
31 all: $(FS_IMAGE)
|
|
32
|
|
33 _%: %.o $(ULIB)
|
|
34 $(LD) $(LDFLAGS) -N -e main -Ttext 0 -o $@ $^ -L ../ $(LIBGCC)
|
|
35 $(OBJDUMP) -S $@ > $*.asm
|
|
36 $(OBJDUMP) -t $@ | sed '1,/SYMBOL TABLE/d; s/ .* / /; /^$$/d' > $*.sym
|
|
37
|
|
38 _forktest: forktest.o $(ULIB)
|
|
39 # forktest has less library code linked in - needs to be small
|
|
40 # in order to be able to max out the proc table.
|
|
41 $(LD) $(LDFLAGS) -N -e main -Ttext 0 -o _forktest forktest.o ulib.o usys.o
|
|
42 $(OBJDUMP) -S _forktest > forktest.asm
|
|
43
|
|
44 $(FS_IMAGE): $(MKFS) $(UPROGS)
|
|
45 $(MKFS) $@ $(UPROGS) UNIX
|
|
46 $(OBJDUMP) -S usys.o > usys.asm
|
|
47
|
|
48 clean:
|
|
49 rm -f *.o *.d *.asm *.sym $(FS_IMAGE) \
|
|
50 .gdbinit \
|
|
51 $(UPROGS)
|