* fpcmake

This commit is contained in:
peter 1999-11-09 22:55:19 +00:00
parent 67a8409186
commit 1d8ee73e62
9 changed files with 3508 additions and 496 deletions

View File

@ -1,12 +1,12 @@
#
# Makefile generated from Makefile.fpc on 1999-11-08 15:24
# Makefile generated from Makefile.fpc on 1999-11-09 20:52
#
defaultrule: Makefile all
Makefile: Makefile.fpc
fpcmake
$(MAKE)
#####################################################################
# Autodetect OS (Linux or Dos or Windows NT)
@ -122,6 +122,20 @@ endif
# Pre Settings
# Allow ALPHA, POWERPC, M68K, I386 defines for target cpu
ifdef ALPHA
CPU_TARGET=alpha
endif
ifdef POWERPC
CPU_TARGET=powerpc
endif
ifdef M68K
CPU_TARGET=m68k
endif
ifdef I386
CPU_TARGET=i386
endif
# RTL
RTL=../rtl
UTILS=../utils
@ -189,15 +203,15 @@ MSGFILE=error$(FPCLANG).msg
# set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
override LOCALDEF+=-dGDB -dBROWSERLOG
# for i386 also insert MMX support
# i386 specific
ifeq ($(CPU_TARGET),i386)
# also insert MMX support
override LOCALDEF+=-dSUPPORT_MMX
endif
# We don't need the intel and binary writer on linux...
ifdef inlinux
override LOCALDEF+=-dNOAG386INT -dNOAG386BIN
endif
endif
override LOCALOPT+=$(LOCALDEF)

View File

@ -4,7 +4,6 @@
[dirs]
fpcdir=..
unitdir=
targetdir=.
[defaults]
@ -16,6 +15,20 @@ toolcmp=1
[presettings]
# Allow ALPHA, POWERPC, M68K, I386 defines for target cpu
ifdef ALPHA
CPU_TARGET=alpha
endif
ifdef POWERPC
CPU_TARGET=powerpc
endif
ifdef M68K
CPU_TARGET=m68k
endif
ifdef I386
CPU_TARGET=i386
endif
# RTL
RTL=../rtl
UTILS=../utils
@ -54,15 +67,15 @@ MSGFILE=error$(FPCLANG).msg
# set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
override LOCALDEF+=-dGDB -dBROWSERLOG
# for i386 also insert MMX support
# i386 specific
ifeq ($(CPU_TARGET),i386)
# also insert MMX support
override LOCALDEF+=-dSUPPORT_MMX
endif
# We don't need the intel and binary writer on linux...
ifdef inlinux
override LOCALDEF+=-dNOAG386INT -dNOAG386BIN
endif
endif
override LOCALOPT+=$(LOCALDEF)

370
compiler/new/Makefile.fpc Normal file
View File

@ -0,0 +1,370 @@
#
# Makefile.fpc for Free Pascal Compiler NEWCG
#
[dirs]
fpcdir=../..
unitdir=$(CPU_TARGET) . $(OLDDIR)
incdir=$(OLDDIR)
targetdir=.
[defaults]
defaultoptions=-Sg
[tools]
tooldiff=1
toolcmp=1
[presettings]
# Allow ALPHA, POWERPC, M68K, I386 defines for target cpu
ifdef ALPHA
CPU_TARGET=alpha
endif
ifdef POWERPC
CPU_TARGET=powerpc
endif
ifdef M68K
CPU_TARGET=m68k
endif
ifdef I386
CPU_TARGET=i386
endif
# Where is the 'old' compiler located
OLDDIR=..
# RTL
RTL=$(OLDDIR)/../rtl
UTILS=$(OLDDIR)/../utils
# Utils used by compiler development/installation
COMPILERUTILS=$(OLDDIR)/utils
# Default language for the compiler
ifndef FPCLANG
FPCLANG=e
endif
# Local defines for the compiler only
ifndef LOCALDEF
LOCALDEF=
endif
# Local options for the compiler only
ifndef LOCALOPT
LOCALOPT=
endif
# Options for the RTL only when cycling
ifndef RTLOPTS
RTLOPTS=
endif
# Message files
MSGFILES=$(wildcard $(OLDDIR)/error*.msg)
# ppcSUFFIX
ifeq ($(CPU_TARGET),i386)
CPUSUF=386
endif
ifeq ($(CPU_TARGET),alpha)
CPUSUF=axp
endif
ifeq ($(CPU_TARGET),m68k)
CPUSUF=68k
endif
ifeq ($(CPU_TARGET),powerpc)
CPUSUF=ppc
endif
[postsettings]
# Default message file
MSGFILE=$(OLDDIR)/error$(FPCLANG).msg
# set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
override LOCALDEF+=-dGDB -dBROWSERLOG -dNEWCG
# i386 specific
ifeq ($(CPU_TARGET),i386)
# also insert MMX support
override LOCALDEF+=-dSUPPORT_MMX
# We don't need the intel and binary writer on linux...
ifdef inlinux
override LOCALDEF+=-dNOAG386INT -dNOAG386BIN
endif
endif
override LOCALOPT+=$(LOCALDEF)
override FPCOPT+=$(LOCALOPT)
[rules]
#####################################################################
# Setup Targets
#####################################################################
ifeq ($(OS_TARGET),win32)
ifdef CMP
override DIFF:=$(CMP) -i138
endif
endif
# Used to avoid unnecessary steps in remake3
ifdef DIFF
ifdef OLDFPC
DIFFRESULT:=$(shell $(DIFF) $(OLDFPC) $(FPC))
else
DIFFRESULT=Not equal
endif
else
DIFFRESULT=No diff program
endif
#####################################################################
# Setup os-independent filenames
#####################################################################
FPCEXENAME=pp$(EXEEXT)
EXENAME=ppc$(CPUSUF)$(EXEEXT)
TEMPNAME=ppc$(EXEEXT)
TEMPNAME1=ppc1$(EXEEXT)
TEMPNAME2=ppc2$(EXEEXT)
TEMPNAME3=ppc3$(EXEEXT)
MAKEDEP=ppdep$(EXEEXT)
MSG2INC=msg2inc$(EXEEXT)
#####################################################################
# CPU targets
#####################################################################
alpha:
$(MAKE) ALPHA=1 all
i386:
$(MAKE) I386=1 all
m68k:
$(MAKE) M68K=1 all
powerpc:
$(MAKE) POWERPC=1 all
#####################################################################
# Default makefile
#####################################################################
all: $(EXENAME)
$(MAKE) echotime
ifeq ($(MAKELEVEL),0)
ifndef STARTTIME
ifdef DATE
STARTTIME:=$(shell $(DATE) +%T)
else
STARTTIME:=unknown
endif
endif
endif
export STARTTIME
ifdef DATE
ENDTIME=$(shell $(DATE) +%T)
else
ENDTIME:=unknown
endif
echotime:
@echo Start $(STARTTIME) now $(ENDTIME)
ifndef DIFFRESULT
next :
@echo $(OLDFPC) and $(FPC) are equal
$(COPY) $(FPC) $(EXENAME)
else
next :
$(MAKE) execlean
$(MAKE) -C $(RTLDIR) clean
$(MAKE) -C $(RTLDIR) 'FPC=$(FPC)' 'OPT=$(RTLOPTS)' all
$(MAKE) clean
$(MAKE) all
endif
clean : execlean fpc_cleanall
execlean :
-$(DEL) ppc386$(EXEEXT) ppcaxp$(EXEEXT) ppc68k$(EXEEXT) ppcppc$(EXEEXT)
distclean: clean
-$(DEL) $(TEMPNAME) $(TEMPNAME1) $(TEMPNAME2) $(TEMPNAME3) $(MSG2INC)
#####################################################################
# Include depencies
#####################################################################
$(MAKEDEP): $(UTILS)/ppdep.pp
$(COMPILER) $(UTILS)/ppdep.pp
$(COPY) $(UTILS)/$(MAKEDEP) $(MAKEDEP)
dependencies : $(MAKEDEP)
$(MAKEDEP) pp.pas $(FPCOPTDEF) $(LOCALDEF) '-F$$(COMPILER) $$(LOCALOPT)' > depend
ifdef USEDEPEND
include depend
endif
#####################################################################
# Make targets
#####################################################################
$(MSG2INC): $(COMPILERUTILS)/msg2inc.pp
$(COMPILER) -FE. $(COMPILERUTILS)/msg2inc.pp
# The msgtxt.inc only depends on the error?.msg file, not on msg2inc,
# because that one will be new almost everytime
msgtxt.inc: $(MSGFILE)
$(MAKE) $(MSG2INC)
$(MSG2INC) $(MSGFILE) msg msg
msg: msgtxt.inc
# Make only the compiler
ifndef COMPLETE
$(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg
$(COMPILER) pp.pas
$(EXECPPAS)
$(MOVE) $(FPCEXENAME) $(EXENAME)
else
$(EXENAME) : $(wildcard *.pas) $(wildcard *.inc) msg
$(COMPILER) pp.pas
$(EXECPPAS)
$(COMPILER) pp.pas
$(EXECPPAS)
$(COMPILER) pp.pas
$(EXECPPAS)
$(MOVE) $(FPCEXENAME) $(EXENAME)
endif
tokens.dat : $(wildcard *.pas) $(wildcard *.inc)
$(COMPILER) tokendat.pas
./tokendat
# This target remakes the units with the currently made version
remake: $(EXENAME)
$(MOVE) $(EXENAME) $(TEMPNAME)
$(MAKE) execlean
$(MAKE) -C $(RTLDIR) clean
$(MAKE) clean
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME)' all
remake3: $(TEMPNAME3)
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME3)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME2)' next
$(DIFF) $(TEMPNAME3) $(EXENAME)
$(TEMPNAME1) : $(EXENAME)
-$(DEL) $(TEMPNAME1)
$(MOVE) $(EXENAME) $(TEMPNAME1)
$(TEMPNAME2) : $(TEMPNAME1)
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME1)' 'OLDFPC=' next
-$(DEL) $(TEMPNAME2)
$(MOVE) $(EXENAME) $(TEMPNAME2)
$(TEMPNAME3) : $(TEMPNAME2)
$(MAKE) 'FPC=$(BASEDIR)/$(TEMPNAME2)' 'OLDFPC=$(BASEDIR)/$(TEMPNAME1)' next
-$(DEL) $(TEMPNAME3)
$(MOVE) $(EXENAME) $(TEMPNAME3)
cycle:
$(MAKE) clean
$(MAKE) -C $(RTLDIR) clean
$(MAKE) -C $(RTLDIR) 'OPT=$(RTLOPTS)' all
$(MAKE) remake3
$(MAKE) echotime
cycledep:
$(MAKE) cycle USEDEPEND=1
cvstest:
$(MAKE) cycle 'LOCALOPT=-n -Se' 'RTLOPTS=-n -Se'
#####################################################################
# Installation
#####################################################################
# This will only install the ppc386.exe, not the message files etc.
quickinstall:
ifdef inlinux
$(MKDIR) $(LIBINSTALLDIR)
$(INSTALLEXE) $(EXENAME) $(LIBINSTALLDIR)
else
$(MKDIR) $(BININSTALLDIR)
ifdef UPX
-$(UPX) $(EXENAME)
endif
$(INSTALLEXE) $(EXENAME) $(BININSTALLDIR)
endif
installlib: quickinstall
ifdef inlinux
$(INSTALLEXE) $(COMPILERUTILS)/samplecfg $(LIBINSTALLDIR)/samplecfg
endif
$(MKDIR) $(MSGINSTALLDIR)
$(INSTALL) $(MSGFILES) $(MSGINSTALLDIR)
# this also installs the link /usr/bin/ppc386. The .deb does that later
install: installlib
ifdef inlinux
$(MKDIR) $(BININSTALLDIR)
ln -sf $(LIBINSTALLDIR)/ppc386 $(BININSTALLDIR)/ppc386
endif
#####################################################################
# Misc
#####################################################################
rtl :
$(MAKE) -C $(RTLDIR) all
rtlclean :
$(MAKE) -C $(RTLDIR) clean
rtlinstall:
$(MAKE) -C $(RTLDIR) install
#####################################################################
# local user configurable file
# in makefile.loc you can add any desired target
#####################################################################
localmake:=$(strip $(wildcard makefile.loc))
ifdef localmake
include ./$(localmake)
endif
#####################################################################
# M68k test targets
#####################################################################
# just a quick way to get ppc68k
# needs to be after makefile.def for PASFILES INCFILES
$(M68KEXENAME): $(PASFILES) $(INCFILES)
$(MAKE) clean
$(FPC) -uI386 -uSUPPORT_MMX -dm68k -o$(M68KEXENAME) pp
$(MAKE) clean

File diff suppressed because it is too large Load Diff

168
install/Makefile.fpc Normal file
View File

@ -0,0 +1,168 @@
#
# Makefile.fpc for Free Component Library
#
[defaults]
defaultrule=help
[dirs]
fpcdir=..
[sections]
info=0
[tools]
toolzip=1
toolupx=1
tooldate=1
[presettings]
# Test dir if none specified
ifndef BASEINSTALLDIR
BASEINSTALLDIR=/pptest
endif
# Directory to the base of the CVS tree
CVSBASE=..
CFG=$(CVSBASE)/rtl/cfg
# Temporary path to pack a file
PACKDIR=$(subst \,/,$(TMP))/pp_tmp
# Use new ppc386
PPNEW=$(BASEDIR)/$(CVSBASE)/compiler/ppc386.exe
# Test dir if none specified
ifndef PACKAGEDIR
PACKAGEDIR=$(BASEDIR)
endif
[rules]
help:
@echo
@echo Possible targets are:
@echo
@echo basego32, basego32.zip
@echo basew32, basew32.zip
@echo
@exit
##########################################################################
# Install
##########################################################################
installer:
$(MAKE) -C $(CVSBASE)/rtl/go32v2 all RELEASE=1
$(MAKE) -C $(CVSBASE)/api all RELEASE=1
$(MAKE) -C $(CVSBASE)/fv all RELEASE=1
$(MAKE) -C fpinst all RELEASE=1
##########################################################################
# Basego32.zip
##########################################################################
basego32:
# create dirs
$(MKDIR) $(BASEINSTALLDIR)
$(MKDIR) $(DOCINSTALLDIR)
$(MKDIR) $(BININSTALLDIR)
$(MKDIR) $(SOURCEINSTALLDIR)
# readme & whatsnew and docs
$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
# bingo32 (cwsdpmi,wmemu387.dxe)
$(COPY) bingo32/* $(BININSTALLDIR)
# source (base)
$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
# compiler
$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=go32v2 RELEASE=1
$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=go32v2
# rtl go32v2
$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
$(MAKE) -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
# rtl go32v2 libs
# $(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
# $(MAKE) -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 PP=$(PPNEW)
# utils
$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=go32v2
$(MAKE) -C $(CVSBASE)/utils all OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
basego32.zip:
$(MAKE) basego32 BASEINSTALLDIR=$(PACKDIR)
cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/basego32.zip * ; cd $(BASEDIR)
$(DELTREE) $(PACKDIR)
##########################################################################
# basew32.zip
##########################################################################
basew32:
# create dirs
$(MKDIR) $(BASEINSTALLDIR)
$(MKDIR) $(DOCINSTALLDIR)
$(MKDIR) $(BININSTALLDIR)
$(MKDIR) $(SOURCEINSTALLDIR)
# readme & whatsnew and docs
$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
# source (base)
$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
# readme.txt & whatsnew.txt
$(MKDIR) $(BASEINSTALLDIR)
$(COPY) readme.txt whatsnew.txt $(BASEINSTALLDIR)
# compiler, the - is necessary because the files sometimes differ
-$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=win32 RELEASE=1
$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=win32
# rtl
$(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
$(MAKE) -C $(CVSBASE)/rtl/win32 install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
# rtl libs
# $(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
# $(MAKE) -C $(CVSBASE)/rtl/win32 libinstall OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
# utils
$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=win32
$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
basew32.zip:
$(MAKE) basew32 BASEINSTALLDIR=$(PACKDIR)
$(MKDIR) $(PACKAGEDIR)
# Maybe you need 4dos for it, becuase unix paths with / are used
cd $(PACKDIR)
$(ZIPPROG) $(PACKAGEDIR)/basew32.zip *
cd $(BASEDIR)
$(DELTREE) $(PACKDIR)
##########################################################################
# Baseemx.zip
##########################################################################
baseemx:
# create dirs
$(MKDIR) $(BASEINSTALLDIR)
$(MKDIR) $(DOCINSTALLDIR)
$(MKDIR) $(BININSTALLDIR)
$(MKDIR) $(SOURCEINSTALLDIR)
# readme & whatsnew and docs
$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
# source (base)
$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
# compiler
$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=os2 RELEASE=1
$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=os2
# rtl os2
$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=os2
$(MAKE) -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
# rtl go32v2 libs
# $(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
# $(MAKE) -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
# utils
$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=os2
$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
baseemx.zip:
$(MAKE) baseemx BASEINSTALLDIR=$(PACKDIR)
cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/baseemx.zip * ; cd $(BASEDIR)
$(DELTREE) $(PACKDIR)

File diff suppressed because it is too large Load Diff

30
install/demo/Makefile.fpc Normal file
View File

@ -0,0 +1,30 @@
#
# Makefile.fpc for shedit
#
[targets]
programs=eratos qsort hello blackbox magic lines fpctris
programs_win32=winhello menu mandel dlltest testdll
programs_linux=mandel samegame
programs_go32v2=mandel samegame
[dirs]
fpcdir=../..
unitdir=$(FPCDIR)/api
targetdir=.
[rules]
ifeq ($(OS_TARGET),win32)
vpath %$(PASEXT) win32
endif
#################################
# Demo installation for linux
#
DEMOINSTALLDIR=$(DOCINSTALLDIR)/demo
installdemo:
$(MKDIR) $(DEMOINSTALLDIR)
$(COPY) -rf * $(DEMOINSTALLDIR)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,25 @@
#
# Makefile.fpc for FPC installer
#
[targets]
units=ziptypes unzip
programs_go32v2=install
programs_win32=install
programs_os2=install
programs_linux=installer
[clean]
files_linux=install.o
[dirs]
fpcdir=../..
unitdir=$(FPCDIR)/fv $(FPCDIR)/api
targetdir=.
[rules]
ifdef inlinux
installer: install.pas
$(COMPILER) -oinstaller install.pas
endif