Skip to content

Commit

Permalink
set up compilation for VM project
Browse files Browse the repository at this point in the history
  • Loading branch information
qguv committed Nov 13, 2016
1 parent 04fdc77 commit d96c07b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.o
*.obj
userprog/swtch.s
vm/swtch.s

# Precompiled Headers
*.gch
Expand All @@ -30,8 +31,12 @@ userprog/swtch.s
*.app
*.coff
userprog/nachos
vm/nachos
bin/coff2noff
test/*
!test/*.c
!test/*.h
!test/script.txt

# Nachos-generated
DISK
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ MAKE = make
all:
# cd threads; $(MAKE) depend
# cd threads; $(MAKE) nachos
cd userprog; $(MAKE) depend
cd userprog; $(MAKE) nachos
# cd vm; $(MAKE) depend
# cd vm; $(MAKE) nachos
# cd userprog; $(MAKE) depend
# cd userprog; $(MAKE) nachos
cd vm; $(MAKE) depend
cd vm; $(MAKE) nachos
# cd filesys; $(MAKE) depend
# cd filesys; $(MAKE) nachos
# cd network; $(MAKE) depend
Expand Down
4 changes: 1 addition & 3 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,10 @@ USERPROG_O = addrspace.o bitmap.o exception.o progtest.o console.o machine.o \
mipssim.o translate.o synchconsole.o memorymanager.o

VM_H = ../filesys/synchdisk.h \
../userprog/synchconsole.h \
../machine/disk.h
VM_C = ../filesys/synchdisk.cc \
../userprog/synchconsole.cc \
../machine/disk.cc
VM_O = synchdisk.o synchconsole.o disk.o
VM_O = synchdisk.o disk.o

FILESYS_H =../filesys/directory.h \
../filesys/filehdr.h\
Expand Down
6 changes: 0 additions & 6 deletions threads/system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Timer *timer; // the hardware timer device,
FileSystem *fileSystem;
#endif

#ifdef FILESYS
SynchDisk *synchDisk;
#endif

#ifdef USER_PROGRAM // requires either FILESYS or FILESYS_STUB
Machine *machine; // user program memory and registers
Expand Down Expand Up @@ -171,9 +169,7 @@ Initialize(int argc, char **argv)
currentThread->spaceId = 0;
#endif

#ifdef FILESYS
synchDisk = new(std::nothrow) SynchDisk("DISK");
#endif

#ifdef FILESYS_NEEDED
fileSystem = new(std::nothrow) FileSystem(format);
Expand Down Expand Up @@ -204,9 +200,7 @@ Cleanup()
delete fileSystem;
#endif

#ifdef FILESYS
delete synchDisk;
#endif

delete timer;
delete scheduler;
Expand Down
2 changes: 0 additions & 2 deletions threads/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ extern Lock *threadsLock;
extern FileSystem *fileSystem;
#endif

#ifdef FILESYS
#include "synchdisk.h"
extern SynchDisk *synchDisk;
#endif

#ifdef NETWORK
#include "post.h"
Expand Down

0 comments on commit d96c07b

Please sign in to comment.