4 FSOFILES := $(OBJDIR)/fs/ide.o \
9 USERAPPS := $(OBJDIR)/user/cat \
15 $(OBJDIR)/user/forktree \
18 FSIMGTXTFILES := fs/newmotd \
21 USERAPPS := $(USERAPPS) \
22 $(OBJDIR)/user/primespipe \
24 $(OBJDIR)/user/testfdsharing \
25 $(OBJDIR)/user/testkbd \
26 $(OBJDIR)/user/testpipe \
27 $(OBJDIR)/user/testpteshare \
28 $(OBJDIR)/user/testshell \
29 $(OBJDIR)/user/testmalloc
31 FSIMGTXTFILES := $(FSIMGTXTFILES) \
39 FSIMGFILES := $(FSIMGTXTFILES) $(USERAPPS)
41 $(OBJDIR)/fs/%.o: fs/%.c fs/fs.h inc/lib.h
44 $(V)$(CC) -nostdinc $(USER_CFLAGS) -c -o $@ $<
46 $(OBJDIR)/fs/fs: $(FSOFILES) $(OBJDIR)/lib/entry.o $(OBJDIR)/lib/libjos.a user/user.ld
49 $(V)$(LD) -o $@ $(ULDFLAGS) $(LDFLAGS) -nostdlib \
50 $(OBJDIR)/lib/entry.o $(FSOFILES) \
51 -L$(OBJDIR)/lib -ljos $(GCC_LIB)
52 $(V)$(OBJDUMP) -S $@ >$@.asm
54 # How to build the file system image
55 $(OBJDIR)/fs/fsformat: fs/fsformat.c
56 @echo + mk $(OBJDIR)/fs/fsformat
58 $(V)gcc $(USER_CFLAGS) -o $(OBJDIR)/fs/fsformat fs/fsformat.c
60 $(OBJDIR)/fs/clean-fs.img: $(OBJDIR)/fs/fsformat $(FSIMGFILES)
61 @echo + mk $(OBJDIR)/fs/clean-fs.img
63 $(V)$(OBJDIR)/fs/fsformat $(OBJDIR)/fs/clean-fs.img 1024 $(FSIMGFILES)
65 $(OBJDIR)/fs/fs.img: $(OBJDIR)/fs/clean-fs.img
66 @echo + cp $(OBJDIR)/fs/clean-fs.img $@
67 $(V)cp $(OBJDIR)/fs/clean-fs.img $@
69 all: $(OBJDIR)/fs/fs.img
71 #all: $(addsuffix .sym, $(USERAPPS))
73 #all: $(addsuffix .asm, $(USERAPPS))