提交 cd354f1d 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

different "all" make targets based on HW

上级 3d00ccd2
......@@ -26,7 +26,7 @@ NM = $(TOOLPREFIX)nm
OBJCOPY = $(TOOLPREFIX)objcopy
STRIP = $(TOOLPREFIX)strip
INCLUDES = -Iinclude -Istdinc -I$(QEMUSRC) -include param.h -include include/compiler.h
INCLUDES = -iquote include -Istdinc -I$(QEMUSRC) -include param.h -include include/compiler.h
COMFLAGS = -static -g -MD -m64 -O3 -Wall -Werror -DHW_$(HW) -DXV6 \
-fno-builtin -fno-strict-aliasing -fno-omit-frame-pointer -fms-extensions \
-mno-sse -mcx16 -mno-red-zone $(INCLUDES)
......@@ -36,6 +36,7 @@ CXXFLAGS := $(COMFLAGS) -std=c++0x -Wno-sign-compare -fno-exceptions -fno-rtti -
ASFLAGS = -Iinclude -I$(O)/include -m64 -gdwarf-2 -MD -DHW_$(HW) -include param.h
LDFLAGS = -m elf_x86_64
ALL :=
all:
include net/Makefrag
......@@ -113,3 +114,6 @@ reboot:
clean:
rm -fr $(O)
all: $(ALL)
......@@ -55,4 +55,5 @@
* user-space version
$ apt-get install libjemalloc-dev
$ make HW=user o.user/utest
$ make HW=user
$ ./o.user/utest
......@@ -51,8 +51,7 @@ OBJS = \
OBJS := $(addprefix $(O)/kernel/, $(OBJS))
KERN = $(O)/kernel.elf
all: $(KERN)
ALL += $(KERN)
$(O)/kernel/%.o: CFLAGS+=-mcmodel=kernel -DXV6_KERNEL
$(O)/kernel/%.o: CXXFLAGS+=-mcmodel=kernel -DXV6_KERNEL
......
#ifndef LWIP_ARCH_CC_H
#define LWIP_ARCH_CC_H
#include <types.h>
#include "types.h"
void lwip_cprintf(const char*, ...) __attribute__((format(printf, 1, 2)));
void lwip_panic(const char*, ...) __noret__ __attribute__((format(printf, 1, 2)));
......
......@@ -6,4 +6,4 @@ $(O)/tools/perf-report: tools/perf-report.cc include/sampler.h
$(Q)mkdir -p $(@D)
g++ -std=c++0x -m64 -Werror -Wall -I. -o $@ $<
all: $(O)/tools/perf-report
ALL += $(O)/tools/perf-report
CXXFLAGS := -Iuser $(filter-out -nostdinc++ -Istdinc, $(CXXFLAGS)) -msse
CXXFLAGS := -iquote user $(filter-out -nostdinc++ -Istdinc, $(CXXFLAGS)) -msse
$(O)/utest: $(O)/kernel/crange.o \
$(O)/kernel/gc.o \
......@@ -10,3 +10,6 @@ $(O)/utest: $(O)/kernel/crange.o \
.PRECIOUS: $(O)/user/%.o
-include $(O)/user/*.d
ALL := $(O)/utest
......@@ -22,3 +22,5 @@ $(O)/%: $(O)/user/%.o $(O)/user/wq.o
.PRECIOUS: $(O)/user/%.o
-include $(O)/user/*.d
ALL := $(O)/xdu $(O)/xls
#include <stdint.h>
#include <inttypes.h>
#include <stdio.h>
#include <assert.h>
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论