Refactor: build env
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
**.o
|
||||
20
Dockerfile
Normal file
20
Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM docker.io/library/ubuntu:22.04
|
||||
|
||||
RUN dpkg --add-architecture i386 && \
|
||||
apt-get update && apt-get -y dist-upgrade && apt-get -y install \
|
||||
build-essential ed \
|
||||
gcc-multilib g++-multilib \
|
||||
lib32ncurses5-dev lib32z1 \
|
||||
zlib1g:i386 libncurses5:i386 \
|
||||
libgcc1:i386 libstdc++5:i386
|
||||
|
||||
WORKDIR /
|
||||
COPY mips-decstation.linux-xgcc.gz /
|
||||
RUN tar -zxvf /mips-decstation.linux-xgcc.gz
|
||||
|
||||
WORKDIR /work
|
||||
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT ["make"]
|
||||
CMD ["-C", "code"]
|
||||
5
Makefile
Normal file
5
Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
.PHONY: all clean docker
|
||||
|
||||
docker:
|
||||
docker build . -t afs2026
|
||||
docker run afs2026 -C code
|
||||
13
code/Makefile
Normal file
13
code/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
.PHONY: all clean run
|
||||
|
||||
all:
|
||||
make -C build.linux depend
|
||||
make -C build.linux -j 16
|
||||
make -C test -j 16
|
||||
|
||||
clean:
|
||||
make -C build.linux distclean
|
||||
make -C test distclean
|
||||
|
||||
run:
|
||||
make -C test run
|
||||
1
code/build.linux/.gitignore
vendored
Normal file
1
code/build.linux/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
nachos
|
||||
@@ -200,7 +200,7 @@ DEFINES = -DFILESYS_STUB -DRDATA -DSIM_FIX
|
||||
# break the thread system. You might want to use -fno-inline if
|
||||
# you need to call some inline functions from the debugger.
|
||||
|
||||
CFLAGS = -g -Wall $(INCPATH) $(DEFINES) $(HOSTCFLAGS) -DCHANGED -m32
|
||||
CFLAGS = -g -Wall $(INCPATH) $(DEFINES) $(HOSTCFLAGS) -DCHANGED -m32 -w
|
||||
LDFLAGS = -m32
|
||||
CPP_AS_FLAGS= -m32
|
||||
|
||||
@@ -211,7 +211,7 @@ LD = g++ -m32 -Wno-deprecated
|
||||
AS = as --32
|
||||
RM = /bin/rm
|
||||
|
||||
INCPATH = -I../network -I../filesys -I../userprog -I../threads -I../machine -I../lib -I-
|
||||
INCPATH = -iquote../network -iquote../filesys -iquote../userprog -iquote../threads -iquote../machine -iquote../lib
|
||||
|
||||
PROGRAM = nachos
|
||||
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user