📄 mk.inc
字号:
# This file evaluates the variables set on the command line and acts on them.
# targ is set to something such as POLG68K, RTPXMSP3, etc.
# RELENV should be N for ebsenv, Y otherwise.
# v=v for debug, v=o for optimized.
root = ..
kernel = c:
# xnett = ../xnet
xnett = ./
ifeq ($(targ),POLSD60)
known = "Y"
# Set the compiler type for later conditionals
compiler = SDS68KCOMPILER
# Set operating system for later conditionals
os = POLLOS
endif
ifeq ($(targ),RTPXSD60)
known = "Y"
# Set the compiler type for later conditionals
compiler = SDS68KCOMPILER
# Set operating system for later conditionals
os = RTPX
endif
ifeq ($(targ),UCOSSD60)
known = "Y"
# Set the compiler type for later conditionals
compiler = SDS68KCOMPILER
# Set operating system for later conditionals
os = UCOS
endif
ifeq ($(targ),POLG68K)
known = "Y"
# Set the compiler type for later conditionals
compiler = GNUCOMPILER
# Set operating system for later conditionals
os = POLLOS
endif
ifeq ($(targ),RTPXG68K)
known = "Y"
# Set the compiler type for later conditionals
compiler = GNUCOMPILER
# Set operating system for later conditionals
os = RTPX
endif
ifeq ($(targ),POLCAD)
known = "Y"
# Set the compiler type for later conditionals
compiler = CADULCOMPILER
# Set operating system for later conditionals
os = POLLOS
endif
ifeq ($(targ),POLG386)
known = "Y"
# Set the compiler type for later conditionals
compiler = GNUCOMPILER
# Set operating system for later conditionals
os = POLLOS
# define djgpp for later use.
djgpp = 1
endif
ifeq ($(targ),RTPXG386)
known = "Y"
# Set the compiler type for later conditionals
compiler = GNUCOMPILER
# Set operating system for later conditionals
os = RTPX
# define djgpp for later use.
djgpp = 1
endif
ifeq ($(targ),POLD860)
known = "Y"
# Set the compiler type for later conditionals
compiler = DIAB860COMPILER
# Set operating system for later conditionals
os = POLLOS
endif
ifeq ($(targ),RTPXD860)
known = "Y"
# Set the compiler type for later conditionals
compiler = DIAB860COMPILER
# Set operating system for later conditionals
os = RTPX
endif
ifeq ($(targ),CMXD860)
known = "Y"
# Set the compiler type for later conditionals
compiler = DIAB860COMPILER
# Set operating system for later conditionals
os = CMX
includes += $(root)/cmx-rtx
endif
ifeq ($(targ),POLMSP3)
known = "Y"
# Set the compiler type for later conditionals
compiler = MSDEVCOMPILER
# Set operating system for later conditionals
os = POLLOS
endif
ifeq ($(targ),CYGMN10300)
known = "Y"
# Set the compiler type for later conditionals
compiler = CYGNUSCOMPILER
INSTALLED_DIR = /build.ecc/install
toolprefix = mn10300-elf-
processor = MN10300
# Set operating system for later conditionals
os = ECOS
endif
ifeq ($(targ),CYGTX39)
known = "Y"
# Set the compiler type for later conditionals
compiler = CYGNUSCOMPILER
INSTALLED_DIR = /build.ecc/install
toolprefix = mips-tx39-elf-
processor = TX39
# Set operating system for later conditionals
os = ECOS
endif
ifeq ($(targ),CYGSLEB)
known = "Y"
# Set the compiler type for later conditionals
compiler = CYGNUSCOMPILER
toolprefix = sparclite-elf-
processor = SPARCLITE
INSTALLED_DIR = /buildsleb.ecc/install
# Set operating system for later conditionals
os = ECOS
endif
ifeq ($(targ),CYGMA860)
known = "Y"
# Set the compiler type for later conditionals
compiler = CYGNUSCOMPILER
toolprefix = powerpc-eabi-
processor = 860
INSTALLED_DIR = /build860.ecc/install
# Set operating system for later conditionals
os = ECOS
endif
ifeq ($(targ),ECOS)
known = "Y"
# Set the compiler type for later conditionals
compiler =
toolprefix =
processor =
# Set operating system for later conditionals
os =
@echo Error building RTIP ECOS > con
@echo You must select a target > con
@echo By modifiying the section > con
@echo At the top of makefile > con
endif
ifeq ($(targ),POLG860)
known = "Y"
# Set the compiler type for later conditionals
compiler = POWERPCEABI
toolprefix = /tools/bin/powerpc-eabi-
processor = PPC860
# Set operating system for later conditionals
os = POLLOS
endif
ifeq ($(targ),TXHCSI)
known = "Y"
includes += /threadx/386pm/metaware
# Set the compiler type for later conditionals
compiler = HIGHCCOMPILER
os = THREADX
endif
ifeq ($(targ),POLHCSI)
known = "Y"
# Set the compiler type for later conditionals
compiler = HIGHCCOMPILER
os = POLLOS
endif
ifeq ($(targ),RTPXHCSI)
known = "Y"
# Set the compiler type for later conditionals
compiler = HIGHCCOMPILER
os = RTPX
endif
ifneq ($(known),"Y")
.PHONY: error
error:
ifneq ($(targ),)
@echo Incorrect target: $(targ) > con
else
@echo Please set the targ and v variables. > con
endif
@echo (Run the mk*.bat files) > con
endif
#if (SDS68KCOMPILER)
ifeq ($(compiler),SDS68KCOMPILER)
# Set the file extensions
obj = o
lib = lib
exe = out
ccflags = -V 68360 -Od -s int=4 -s enum=4 -E -
ldflags =
ifeq ($(dbv),v)
ccflags += -f
# ldflags += -g
endif
endif # SDS68KCOMPILER
#endif (SDS68KCOMPILER)
#if (DIAB860COMPILER)
ifeq ($(compiler),DIAB860COMPILER)
# Set the file extensions
obj = o
lib = a
exe = out
ccflags = -c
#ldflags = -lc -m2 -tPPC860EN:simple
ldflags = -Xdont-die -lc -ld -m2 -tPPC860EN:simple -@O=$@.map
ifeq ($(targ),CMXD860)
ccflags += -X58=4 -X59=2
endif
ifeq ($(dbv),v)
ccflags += -g
# ldflags += -g
endif
endif # DIAB860COMPILER
#endif (DIAB860COMPILER)
#if (POWERPCEABI)
ifeq ($(compiler),POWERPCEABI)
# Set the file extensions
obj = o
lib = a
exe = s19
#INSTALLED_DIR = /build.ecc/install
#LIB_DIR = $(INSTALLED_DIR)/lib
#includes = $(INSTALLED_DIR)/include
#includes += $(INSTALLED_DIR)/include/cyg/kernel
#includes += $(INSTALLED_DIR)/include/cyg/hal
#ccflags += -nostdinc -O2 -mbig -mcall-aix -mrelocatable-lib -mno-eabi
ccflags += -nostdinc -O2 -mbig -mrelocatable-lib -mno-eabi
ccflags += -mstrict-align -fno-builtin -mcpu=860
# enable assembler listings to log file
//ccflags += -Wa,-alh
ifeq ($(v),v)
ccflags += -g -fno-builtin
ldflags += -g
endif
endif
#endif (POWERPCEABI)
#if (CADULCOMPILER)
ifeq ($(compiler),CADULCOMPILER)
# Set the file extensions
obj = obj
lib = lib
exe = omf
endif # CADULCOMPILER
#endif (CADULCOMPILER)
#if (HIGHCCOMPILER)
ifeq ($(compiler),HIGHCCOMPILER)
# Set the file extensions
obj = obj
lib = lib
exe = omf
# ccflags += -c -386 -Mf -w3 -Hcppext=c,cpp -Hcpplvl=3
# ccflags += -Hefmat="%f(%l) col %c: error %n: " -Hwfmat="%f(%l) col %c: warning %n: "
# ccflags += -Hipname=INCLUDE -Hnocopyr
# ccflags += -Hoff=Behaved -Hoff=Optimize_frame_pointer -Hon=Use_frame_pointer
# ccflags += -Hon=Const_in_code -Hon=Long_enums -Hoff=Demote_sizes
# ccflags += -Hpragma=Offwarn(572) -Hpragma=Offwarn(648)
# ccflags += -Hpragma=Align_members(1) -Hthread
#
# ifeq ($(dbv),v)
# ccflags += -DDEBUGVER -DTM -g -O0
# else
# ccflags += runopt = -DSA -Hi -O7
# endif
ccflags += -c -386 -Hpragma=Align_members(1) -Hon=Use_frame_pointer -Hpragma=Offwarn(572) -Hpragma=Offwarn(648)
ifeq ($(dbv),v)
ccflags += -g -O0
else
ccflags += -O7
endif
endif # HIGHCCOMPILER
#endif (HIGHCCOMPILER)
#if (GNUCOMPILER)
ifeq ($(compiler),GNUCOMPILER)
# Set the file extensions
obj = o
lib = a
ifeq ($(dbv),v)
ccflags += -g
ldflags += -g
endif
ifdef djgpp
exe = exe
ldflags += -L$(kernel)/djgpp/lib -L$(kernel)/djgpp/lib/gcc-lib/djgpp/2.80 $(kernel)/djgpp/lib/crt0.o
endif
endif
#endif (GNUCOMPILER)
#if (CYGNUSCOMPILER)
ifeq ($(compiler),CYGNUSCOMPILER)
# Set the file extensions
obj = o
lib = a
exe =
# INSTALLED_DIR = /build.ecc/install
LIB_DIR = $(INSTALLED_DIR)/lib
includes = $(INSTALLED_DIR)/include
includes += $(INSTALLED_DIR)/include/cyg/kernel
includes += $(INSTALLED_DIR)/include/cyg/hal
EXTRACFLAGS = -Wall -ffunction-sections -fdata-sections
EXTRACXXFLAGS = $(EXTRACFLAGS) -fno-exceptions -fno-rtti -fvtable-gc -finit-priority
ifeq ($(targ),CYGMA860)
ccflags += -msoft-float -mcpu=860
endif
ccflags += -fno-builtin $(EXTRACXXFLAGS)
ifeq ($(dbv),v)
ccflags += -g
ldflags += -g
endif
endif
#endif (CYGNUSCOMPILER)
#if (MSDEVCOMPILER)
ifeq ($(compiler),MSDEVCOMPILER)
# Set the file extensions
obj = obj
lib = lib
exe = exe
builtins += _MSC_VER=1000 _M_IX86=386
clflags += /c
ifeq ($(dbv),v)
clflags += /Zi
linkflags += /DEBUG
endif
endif
#endif (MSDEVCOMPILER)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -