summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 1 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 561311a..a4e961a 100644
--- a/Makefile
+++ b/Makefile
@@ -53,13 +53,11 @@ OBJS += \
endif
-ifeq ($(LAB),net)
OBJS += \
$K/e1000.o \
$K/net.o \
$K/sysnet.o \
$K/pci.o
-endif
# riscv64-unknown-elf- or riscv64-linux-gnu-
@@ -92,7 +90,7 @@ CFLAGS = -Wall -Werror -O -fno-omit-frame-pointer -ggdb -gdwarf-2
ifdef LAB
LABUPPER = $(shell echo $(LAB) | tr a-z A-Z)
-XCFLAGS += -DSOL_$(LABUPPER) -DLAB_$(LABUPPER) -DLAB_PGTBL
+XCFLAGS += -DSOL_$(LABUPPER) -DLAB_$(LABUPPER) -DLAB_PGTBL -DLAB_NET
endif
CFLAGS += $(XCFLAGS)
@@ -102,9 +100,7 @@ CFLAGS += -ffreestanding -fno-common -nostdlib -mno-relax
CFLAGS += -I.
CFLAGS += $(shell $(CC) -fno-stack-protector -E -x c /dev/null >/dev/null 2>&1 && echo -fno-stack-protector)
-ifeq ($(LAB),net)
CFLAGS += -DNET_TESTS_PORT=$(SERVERPORT)
-endif
ifdef KCSAN
CFLAGS += -DKCSAN
@@ -252,11 +248,8 @@ UPROGS += \
endif
-
-ifeq ($(LAB),net)
UPROGS += \
$U/_nettests
-endif
UEXTRA=
UEXTRA += user/xargstest.sh
@@ -297,10 +290,8 @@ QEMUOPTS += -global virtio-mmio.force-legacy=false
QEMUOPTS += -drive file=fs.img,if=none,format=raw,id=x0
QEMUOPTS += -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0
-ifeq ($(LAB),net)
QEMUOPTS += -netdev user,id=net0,hostfwd=udp::$(FWDPORT)-:2000 -object filter-dump,id=net0,netdev=net0,file=packets.pcap
QEMUOPTS += -device e1000,netdev=net0,bus=pcie.0
-endif
qemu: $K/kernel fs.img
$(QEMU) $(QEMUOPTS)
@@ -312,7 +303,6 @@ qemu-gdb: $K/kernel .gdbinit fs.img
@echo "*** Now run 'gdb' in another window." 1>&2
$(QEMU) $(QEMUOPTS) -S $(QEMUGDB)
-ifeq ($(LAB),net)
# try to generate a unique port for the echo server
SERVERPORT = $(shell expr `id -u` % 5000 + 25099)
@@ -321,7 +311,6 @@ server:
ping:
python3 ping.py $(FWDPORT)
-endif
##
## FOR testing lab grading script