⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 一款拥有一定历史的C语言编译器
💻
📖 第 1 页 / 共 2 页
字号:
#	Makefile for c68 and c386
#
#	N.B.  Some modules will generate empty source files
#		according to the #define statements in config.h
#
#	As well as entries for c68 and c386, there are also
#	entries for the compilers that are typically used to
#	boot the c68/c386 compilers for the first time.

PROG=c68

#CFLGS=  -DNDEBUG -O
CFLGS= -g

SRCDIR=
OBJDIR=linux/
BINDIR=linux/

# cxref flags
CXFLAGS=-d -l -s

# indent flags
INDENTFLAGS= -bad -br -ce -di8 -i4 -npsl \
	-TADDRESS -TAMODE -TBITSIZE -TBLOCK -TBOOL -TBTYPE -TCHAR -TCODE \
	-TCONDITION -TCSE -TDEEP -TEXPR -TEXPRTYPE -TFLAGS -TILEN \
	-TIVAL -TLABEL -TLEVEL -TLINE -TMODEL -TMSGNUM -TOPCODE -TOPTENUM \
	-TOPTION -TOPTIONS -TPEEPFLAGS -TPEEPINFO -TQUALIFIER -TRANGE \
	-TREG -TREGBITMAP -TREGLIST -TREGMASK -TREGTYPE -TREGUSAGE -TRVAL \
	-TSEQNUM -TSIZE -TSTATE -TSTATUS -TSTMT -TSTMTTYPE -TSTORAGE \
	-TSTRING -TSWITCH -TSYM -TTABLE -TTARGET -TTOKEN -TTYP -TUSES -TUVAL \
	-TVISIBILITY

# File suffix seperator (default)
S=.
# Object file extension
O=o
# Flag for name of object file
OF = -o 
# Additional libraries
LIB =
# Command to delete files
RM=rm -f

#------------------------------------------------------------------------------
# Use the following if compiling c68/c386 with c68 on Minix
# CCFLAGS= -Qwarn=8 -Qerror=3 -Qstackopt=3 -D__STDC__=1
# LDFLAGS= -m250000
#------------------------------------------------------------------------------
# Use the following if compiling c68/c386 with c386 on Minix
# CCFLAGS= -Qwarn=8 -Qerror=3 -Qstackopt=3 -D__STDC__=1
# LDFLAGS= -m250000
#------------------------------------------------------------------------------
# Use the following if compiling c68 with ACK (68k version)
# CCFLAGS=
# LDFLAGS= -m250000
#------------------------------------------------------------------------------
# Use the following if compiling c68 with Microsoft Visual C
# CCFLAGS= -Zl -Od
# LDFLAGS= -ML -MDd
# CC = cl -nologo
# O = obj
# OF = -Fo
# RM = del
# LIB =
#------------------------------------------------------------------------------
# Use the following if compiling c68/c386 with GNU C on Minix
# CCFLAGS=	-Wall -ansi -pedantic -Wshadow -Wpointer-arith \
#	-Wwrite-strings -Wcast-qual -Wwrite-strings -Wcast-align \
#	-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
#	-Wredundant-decls -Wnested-externs
# LDFLAGS= -s -m250000
#------------------------------------------------------------------------------
# Use the following if compiling c386 with bcc on Minix
# CCFLAGS=
# LDFLAGS=
#------------------------------------------------------------------------------
# Use the following if compiling c68 with c68 on QDOS
# CCFLAGS= -Qmaxerr=3 -Qwarn=8 -Qerror=3 -Qstackopt=maximum
# CCFLAGS= -Qmaxerr=10 -Qwarn=8 -Qerror=8 -Qstackopt=maximum
# LDFLAGS = -bufp400K -ms
# S=_
# SRCDIR=
# OBJDIR=
# BINDIR=ram3_
#------------------------------------------------------------------------------
# Use the following if compiling c86 with TopSpeed on DOS
# and then do
#	MAKE sibo		to build both versions
#	MAKE c86check		to build code checking only version
#	MAKE c86code		to build code check and generation version
#CC=tsc /zq /fpC86.PR
#O=obj
#RM=del
#------------------------------------------------------------------------------
# Use the following if compiling c86 with GNU C
#CCFLAGS=  -Wall -ansi -pedantic -Wshadow -Wpointer-arith \
#	-Wwrite-strings -Wcast-qual -Wwrite-strings -Wcast-align \
#	-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
#	-Wredundant-decls -Wnested-externs
#------------------------------------------------------------------------------
CFLAGS=-c $(CCFLAGS) $(CFLGS)

#------------------------------------------------------------------------------
#	Source files common to all versions of c68/c386
SRC1 =	$(SRCDIR)analyze$(S)c \
		$(SRCDIR)cglbdef$(S)c \
		$(SRCDIR)cmain$(S)c \
		$(SRCDIR)decl$(S)c \
		$(SRCDIR)expr$(S)c \
		$(SRCDIR)extern$(S)c
SRC2 =	$(SRCDIR)genicode$(S)c \
		$(SRCDIR)geninit$(S)c \
		$(SRCDIR)genstmt$(S)c \
		$(SRCDIR)genutil$(S)c \
		$(SRCDIR)getsym$(S)c \
		$(SRCDIR)init$(S)c
SRC3 =	$(SRCDIR)intexpr$(S)c \
		$(SRCDIR)list$(S)c \
		$(SRCDIR)memmgt$(S)c \
		$(SRCDIR)msgout$(S)c \
		$(SRCDIR)optimize$(S)c
SRC4 =	$(SRCDIR)outgen$(S)c \
		$(SRCDIR)stmt$(S)c \
		$(SRCDIR)symbol$(S)c \
		$(SRCDIR)system$(S)c \
		$(SRCDIR)types$(S)c
SRC5 =	$(SRCDIR)outdbg_d$(S)c \
		$(SRCDIR)gendbg$(S)c \
		$(SRCDIR)inline$(S)c
SRC =	$(SRC1) $(SRC2) $(SRC3) $(SRC4) $(SRC5)

HDR =	$(SRCDIR)chdr$(S)h \
		$(SRCDIR)cglbdec$(S)h \
		$(SRCDIR)config$(S)h \
		$(SRCDIR)expr$(S)h \
		$(SRCDIR)message$(S)h \
		$(SRCDIR)outproto$(S)h \
		$(SRCDIR)version$(S)h \
		$(SRCDIR)proto$(S)h \
		$(SRCDIR)check$(S)h

#	Source files specific to c68 680X0 versions
SRC68K =$(SRCDIR)flow68k$(S)c \
		$(SRCDIR)gen68k$(S)c \
		$(SRCDIR)genffp$(S)c \
		$(SRCDIR)genieee$(S)c \
		$(SRCDIR)peep68k$(S)c \
		$(SRCDIR)out68k_a$(S)c \
		$(SRCDIR)out68k_c$(S)c \
		$(SRCDIR)out68k_g$(S)c \
		$(SRCDIR)out68k_q$(S)c \
		$(SRCDIR)reg68k$(S)c
HDR68K =$(SRCDIR)gen68k$(S)h

#	Source files specific to INTEL versions
SRCX86 =$(SRCDIR)peepx86$(S)c \
		$(SRCDIR)regx86$(S)c \
		$(SRCDIR)outx86_a$(S)c \
		$(SRCDIR)outx86_b$(S)c \
		$(SRCDIR)outx86_g$(S)c \
		$(SRCDIR)outx86_n$(S)c \
		$(SRCDIR)outx86_s$(S)c
HDRX86 =$(SRCDIR)genx86$(S)h

#	Source files specific to c386 INTEL 386 versions
SRC386 =$(SRCDIR)gen386$(S)c
HDR386 =$(SRCDIR)gen386$(S)h

#	Source files specific to c386 INTEL 386 versions
SRC86  =$(SRCDIR)gen86$(S)c
HDR86  =$(SRCDIR)gen86$(S)h

#	Source files specific to carm ARM versions
SRCARM =$(SRCDIR)genarm$(S)c \
		$(SRCDIR)peeparm$(S)c \
		$(SRCDIR)outarm_a$(S)c \
		$(SRCDIR)outarm_o$(S)c \
		$(SRCDIR)regarm$(S)c
HDRARM =$(SRCDIR)genarm$(S)h

#	Source files specific to c30 TI TMS320C30 versions
SRCC30 =$(SRCDIR)flowc30$(S)c \
		$(SRCDIR)genc30$(S)c \
		$(SRCDIR)peepc30$(S)c \
		$(SRCDIR)outc30_r$(S)c \
		$(SRCDIR)regc30$(S)c
HDRC30 =$(SRCDIR)genc30$(S)h

#	Source files specific to PowerPC versions
SRCPPC =$(SRCDIR)genppc$(S)c \
		$(SRCDIR)peepppc$(S)c \
		$(SRCDIR)outppc$(S)c \
		$(SRCDIR)regppc$(S)c
HDRPPC =$(SRCDIR)genppc$(S)h

#	Source files specific to the SIBO build enviroment
SRCSIBO=$(SRCDIR)c86$(S)c \
		$(SRCDIR)c86$(S)pic \
		$(SRCDIR)c86$(S)afl \
		$(SRCDIR)c86$(S)shd \
		$(SRCDIR)c86$(S)pr \
		$(SRCDIR)config$(S)chk \
		$(SRCDIR)config$(S)gen \
		$(SRCDIR)config$(S)bat

#	Source files specific to the EPOC build enviroment
SRCEPOC=$(SRCDIR)c68$(S)mmp

#	PC Lint files
SRCLINT=$(SRCDIR)c68$(S)lnt \
		$(SRCDIR)include$(S)lnt

#	Extra files
SRCEXTR=$(SRCDIR)cmains$(S)c \
		$(SRCDIR)c86$(S)c \
		$(SRCDIR)c86$(S)dsw \
		$(SRCDIR)c86$(S)dsp \
		$(SRCDIR)c68$(S)dsw \
		$(SRCDIR)c68$(S)dsp \
		$(SRCDIR)config$(S)c86 \
		$(SRCDIR)config$(S)c68 \
		$(SRCDIR)config$(S)txt \
		$(SRCDIR)lltest$(S)c \
		$(SRCDIR)lltest$(S)dsp

#------------------------------------------------------------------------------
#	Object files common to all c68/c386 variants
OBJ =	$(OBJDIR)analyze$(S)$(O) \
		$(OBJDIR)cglbdef$(S)$(O) \
		$(OBJDIR)cmain$(S)$(O) \
		$(OBJDIR)decl$(S)$(O) \
		$(OBJDIR)expr$(S)$(O) \
		$(OBJDIR)extern$(S)$(O) \
		$(OBJDIR)genicode$(S)$(O) \
		$(OBJDIR)geninit$(S)$(O) \
		$(OBJDIR)genstmt$(S)$(O) \
		$(OBJDIR)genutil$(S)$(O) \
		$(OBJDIR)getsym$(S)$(O) \
		$(OBJDIR)init$(S)$(O) \
		$(OBJDIR)inline$(S)$(O) \
		$(OBJDIR)intexpr$(S)$(O) \
		$(OBJDIR)list$(S)$(O) \
		$(OBJDIR)memmgt$(S)$(O) \
		$(OBJDIR)msgout$(S)$(O) \
		$(OBJDIR)optimize$(S)$(O) \
		$(OBJDIR)outgen$(S)$(O) \
		$(OBJDIR)stmt$(S)$(O) \
		$(OBJDIR)symbol$(S)$(O) \
		$(OBJDIR)system$(S)$(O) \
		$(OBJDIR)types$(S)$(O) \
		$(OBJDIR)gendbg$(S)$(O) \
		$(OBJDIR)outdbg_d$(S)$(O)

#	Object files specific to Motorola 680X0 variants
OBJ68K =$(OBJDIR)flow68k$(S)$(O) \
		$(OBJDIR)gen68k$(S)$(O) \
		$(OBJDIR)genffp$(S)$(O) \
		$(OBJDIR)genieee$(S)$(O) \
		$(OBJDIR)peep68k$(S)$(O) \
		$(OBJDIR)out68k_a$(S)$(O) \
		$(OBJDIR)out68k_c$(S)$(O) \
		$(OBJDIR)out68k_g$(S)$(O) \
		$(OBJDIR)out68k_q$(S)$(O) \
		$(OBJDIR)reg68k$(S)$(O)

#	Object files specific to INTEL variants
OBJX86 =$(OBJDIR)peepx86$(S)$(O) \
		$(OBJDIR)regx86$(S)$(O) \
		$(OBJDIR)outx86_a$(S)$(O) \
		$(OBJDIR)outx86_b$(S)$(O) \
		$(OBJDIR)outx86_g$(S)$(O) \
		$(OBJDIR)outx86_n$(S)$(O) \
		$(OBJDIR)outx86_s$(S)$(O)

#	Object files specific to INTEL 386 variants
OBJ386 =$(OBJDIR)gen386$(S)$(O)

#	Object files specific to INTEL 86 variants
OBJ86  =$(OBJDIR)gen86$(S)$(O)

#	Object files specific to ARM variants
OBJARM =$(OBJDIR)genarm$(S)$(O) \
		$(OBJDIR)peeparm$(S)$(O) \
		$(OBJDIR)outarm_a$(S)$(O) \
		$(OBJDIR)outarm_o$(S)$(O) \
		$(OBJDIR)regarm$(S)$(O)

#	Object files specific to TI TMS320C30 versions
OBJC30 =$(OBJDIR)flowc30$(S)$(O) \
		$(OBJDIR)genc30$(S)$(O) \
		$(OBJDIR)peepc30$(S)$(O) \
		$(OBJDIR)outc30_r$(S)$(O) \
		$(OBJDIR)regc30$(S)$(O)

#	Object files specific to PowerPC versions
OBJPPC =$(OBJDIR)genppc$(S)$(O) \
		$(OBJDIR)peepppc$(S)$(O) \
		$(OBJDIR)outppc$(S)$(O) \
		$(OBJDIR)regppc$(S)$(O)

#	All object files
OBJS   =$(OBJ) $(OBJ68K) $(OBJX86) $(OBJ386) $(OBJ86) $(OBJARM) $(OBJC30) \
	$(OBJPPC)

#------------------------------------------------------------------------------
#	The following is only required if your library does not
#	already contain this routine.
# SRCLIB = $(SRCDIR)vfprintf$(S)c
# OBJLIB = $(OBJDIR)vfprintf$(S)o
#	Use this setting if you already have vfprintf
SRCLIB =
OBJLIB =

#------------------------------------------------------------------------------
LNS    =$(OBJS:.o=.ln)
CXS    =$(OBJS:.o=.cx)

.SUFFIXES:	$(S)ln $(S)cx $(S)obj $(S)o

#------------------------------------------------------------------------------
all:		$(BINDIR)$(PROG)

$(S)c$(S)obj:
		$(CC) $(CFLAGS) $*

$(S)c$(S)ln:
		lint $(CFLAGS) -m -u -c $<

$(S)c$(S)cx:

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -