📄 makefile.pc
字号:
## Copyright (C) 1998, 1999, Jonathan S. Shapiro.## This file is part of the EROS Operating System.## This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License# as published by the Free Software Foundation; either version 2,# or (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.## The use of install rather than package is intentional -- building# down inside a kernel directory is standalone, and should only build# the kernel.default: installEROS_SRC=../../../../../..CROSS_BUILD=yesinclude $(EROS_SRC)/build/lib/make/makevars.mkBUILDDIR=.# KERNENTRY must match the value of KERNBOOTBASE in # eros/target-asm-i486.hKERNENTRY=0x00101000TOP=$(EROS_SRC)/base/sys%config# Some debugging/tracing/analysis options:## Pentium: -DSINGLE_PIPE make processor use only one pipe# Pentium: -DNO_LARGE_PAGES do not use Pentium large page optimizations# Pentium: -DNO_GLOBAL_PAGES do not use P-II/PPro global page optimizations# Pentium: -DALLOW_USER_RDTSC permit RDTSR instruction from user level# Any: -DWRITE_THROUGH make all pages write-through# Any: -DSTRESS_TEST runs things in ways designed to break things# Some legacy compilation options:# -DSUPPORT_386 support obsolete processors#ALIGN=-malign-functions=4EMUL_486=-DNO_LARGE_PAGES -DWRITE_THROUGH -DSINGLE_PIPEOPTIM= -g -O2 -m486 # $(PACK_OPTIM)INC=-include kernel-config.h -I../../include -I$(EROS_ROOT)/include -I../.. -I$(TOP) -I.DEF+=-D__KERNEL__ -DTRACE=$(TRACE) #DEF+=-DFAST_IPC_ARG_VALIDATE#DEF+=$(EMUL_486)DEF += $(EROS_TEST_DEFS)################################################### Following are all debugging options of one# sort or another:###################################################DEF+= -DDBG_CLEAN# set the following to 2 to do it after every interrupt#DEF+= -DDBG_WILD_PTR=1# Following is sometimes also helpful:#DEF += -DNO_LARGE_PAGES#DEF+= -DDOMAIN_TRACING%optvarifeq "$(OPT_PURE_ENTRY_STRINGS)" "1"DEF+=-DASM_VALIDATE_STRINGSendififeq "$(OPT_KERNEL_PROFILER)" "1"# adjusting alignment eliminates false sharing in the profile ticks:ALIGN= -malign-functions=4endifOPTIM += $(ALIGN)LIBS=../../gplus-lib/gplus-lib.a # libkey.a# %targetsTARGETS=$(CONFIG).eros ifeq "$(OPT_DDB)" "1"TARGETS += $(CONFIG).eros.debugelseOPTIM += -fomit-frame-pointerendifOPTIM += -fno-builtinCRT1=../../gplus-lib/gnu_crt1.oCRTN=../../gplus-lib/gnu_crtn.oCLEANLIST=fd.image boot.image symnames.s image.* # libkey.aCLEANLIST += process_asm_offsets.h machineLINK=$(LD) -static -N -Ttext $(KERNENTRY) -nostdlib # -debug%options# DEF += $(OPTIONS)$(BUILDDIR)/interrupt.o: process_asm_offsets.h$(BUILDDIR)/.interrupt.m: process_asm_offsets.h%objectsinclude $(EROS_SRC)/build/lib/make/makerules.mk$(BUILDDIR)/lostart.o: ../../kernel/lostart.S $(ASM_BUILD)NODEBUG_OBJECTS=DebuggerStubs.oDEBUG_OBJECTS=Debugger.o symnames.o$(BUILDDIR)/DebuggerStubs.o: ../../kernel/DebuggerStubs.cxx $(CXX_BUILD)$(BUILDDIR)/Debugger.o: ../../kernel/Debugger.cxx $(CXX_BUILD)$(BUILDDIR)/process_asm_offsets.h: ../../LAYOUT $(TOP)/scripts/GenProcOffsets.awk $(EROS_CPP) -I$(TOP) $(DEF) -include kernel-config.h ../../LAYOUT | \ $(GAWK) -f $(TOP)/scripts/GenProcOffsets.awk > $@all: $(TARGETS)install: all $(INSTALL) -d $(EROS_ROOT)/lib/ $(INSTALL) -d $(EROS_ROOT)/lib/$(EROS_TARGET) $(INSTALL) -d $(EROS_ROOT)/lib/$(EROS_TARGET)/image $(INSTALL) -m 0644 $(TARGETS) $(EROS_ROOT)/lib/$(EROS_TARGET)/image/.FORCE:$(CONFIG).eros: $(BUILDDIR)/lostart.o $(OBJECTS) $(NODEBUG_OBJECTS) $(LIBS) $(LINK) -o $(CONFIG).eros lostart.o $(CRT1) $(OBJECTS) \ $(NODEBUG_OBJECTS) $(LIBS) $(CRTN) $(SIZE) $(CONFIG).eros$(CONFIG).eros.debug: $(BUILDDIR)/lostart.o $(OBJECTS) $(DEBUG_OBJECTS) $(LIBS) $(LINK) -o $(CONFIG).eros.debug lostart.o $(CRT1) $(OBJECTS) \ $(DEBUG_OBJECTS) $(LIBS) $(CRTN) $(SIZE) $(CONFIG).eros $(SIZE) $(CONFIG).eros.debug$(BUILDDIR)/symnames.o: $(BUILDDIR)/symnames.s $(ASM_BUILD)#libkey.a: $(LIBKEY_OBJECTS)# $(AR) -crv libkey.a $(LIBKEY_OBJECTS)# $(RANLIB) libkey.a## This way of obtaining symnames.s is quite slow. I should undoubtedly# replace the awk script with a C program. Time, however, is short at # the moment.$(BUILDDIR)/symnames.s: $(CONFIG).eros $(OBJDUMP) --syms --stabs $(CONFIG).eros | $(GAWK) -f $(TOP)/scripts/symtab.awk > $@../../gplus-lib/gplus-lib.a: cd ../../gplus-lib; $(MAKE)%depend-include ./.*.m
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -