mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-14 04:49:43 +02:00
148 lines
3.5 KiB
Makefile
148 lines
3.5 KiB
Makefile
#
|
|
# Makefile.fpc for Free Component Library
|
|
#
|
|
|
|
[defaults]
|
|
defaultrule=help
|
|
|
|
[sections]
|
|
info=0
|
|
|
|
[tools]
|
|
toolzip=1
|
|
toolupx=1
|
|
tooldate=1
|
|
|
|
|
|
[presettings]
|
|
OLDFPCDIR:=$(FPCDIR)
|
|
|
|
checkfpcdir:
|
|
ifdef OLDFPCDIR
|
|
@echo You must unset FPCDIR to use this Makefile
|
|
@exit 1
|
|
endif
|
|
|
|
# Test dir if none specified
|
|
ifndef PREFIXINSTALLDIR
|
|
PREFIXINSTALLDIR=/pptest
|
|
endif
|
|
|
|
# Directory to the base of the CVS tree
|
|
CVSBASE=..
|
|
|
|
# Always compile for release
|
|
override RELEASE=1
|
|
|
|
# Temporary path to pack a file
|
|
BASEPACKDIR=$(BASEDIR)/basepack
|
|
|
|
# Use new ppc386
|
|
PPNEW=$(BASEDIR)/$(CVSBASE)/compiler/ppc386.exe
|
|
PPUFILESNEW=$(BASEDIR)/$(CVSBASE)/utils/ppufiles.exe
|
|
|
|
# Build/install options
|
|
BUILDOPTS=FPC=$(PPNEW) RELEASE=1
|
|
INSTALLOPTS=FPC=$(PPNEW) PPUFILES=$(PPUFILESNEW) ZIPDESTDIR=$(BASEDIR)
|
|
|
|
|
|
[rules]
|
|
.PHONY: help checkfpcdir
|
|
|
|
help:
|
|
@echo
|
|
@echo Possible targets are:
|
|
@echo
|
|
@echo basego32, basego32.zip
|
|
@echo basew32, basew32.zip
|
|
@echo
|
|
@exit 1
|
|
|
|
|
|
##########################################################################
|
|
# Install
|
|
##########################################################################
|
|
|
|
.PHONY: installer
|
|
|
|
installer:
|
|
$(MAKE) -C fpinst all RELEASE=1
|
|
|
|
|
|
##########################################################################
|
|
# Basego32.zip
|
|
##########################################################################
|
|
|
|
.PHONY: build installbase zipinstall zipinstallbase zipinstallfcl \
|
|
zipinstallpackages
|
|
|
|
export RELEASE DESTZIPDIR
|
|
|
|
build: checkfpcdir
|
|
# create new compiler
|
|
-$(MAKE) -C $(CVSBASE) compiler_cycle
|
|
# clean
|
|
$(MAKE) -C $(CVSBASE) rtl_clean
|
|
$(MAKE) -C $(CVSBASE) fcl_clean
|
|
$(MAKE) -C $(CVSBASE) packages_clean
|
|
$(MAKE) -C $(CVSBASE) utils_clean
|
|
# build everything
|
|
$(MAKE) -C $(CVSBASE) rtl_smart $(BUILDOPTS)
|
|
$(MAKE) -C $(CVSBASE) fcl_smart $(BUILDOPTS)
|
|
$(MAKE) -C $(CVSBASE) packages_smart $(BUILDOPTS)
|
|
$(MAKE) -C $(CVSBASE) utils_all $(BUILDOPTS)
|
|
|
|
|
|
installbase:
|
|
# create dirs
|
|
$(MKDIR) $(BASEINSTALLDIR)
|
|
$(MKDIR) $(DOCINSTALLDIR)
|
|
$(MKDIR) $(BININSTALLDIR)
|
|
$(MKDIR) $(SOURCEINSTALLDIR)
|
|
# readme & whatsnew and docs
|
|
$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
|
|
# bingo32 (cwsdpmi,wmemu387.dxe)
|
|
ifeq ($(OS_TARGET),go32v2)
|
|
$(COPY) bingo32/* $(BININSTALLDIR)
|
|
endif
|
|
# source (base)
|
|
$(COPY) $(CVSBASE)/Makefile $(CVSBASE)/Makefile.fpc $(SOURCEINSTALLDIR)
|
|
# install generated things
|
|
$(MAKE) -C $(CVSBASE) compiler_install $(INSTALLOPTS)
|
|
$(MAKE) -C $(CVSBASE) rtl_install $(INSTALLOPTS)
|
|
$(MAKE) -C $(CVSBASE) utils_install $(INSTALLOPTS)
|
|
|
|
zipinstallbase:
|
|
$(MKDIR) $(BASEPACKDIR)
|
|
$(MAKE) installbase PREFIXINSTALLDIR=$(BASEPACKDIR)
|
|
cd $(BASEPACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/basego32.zip * ; cd $(BASEDIR)
|
|
$(DELTREE) $(BASEPACKDIR)
|
|
|
|
zipinstallapi:
|
|
$(MAKE) -C $(CVSBASE) api_zipinstall $(INSTALLOPTS)
|
|
|
|
zipinstallfcl:
|
|
$(MAKE) -C $(CVSBASE) fcl_zipinstall $(INSTALLOPTS)
|
|
|
|
zipinstallpackages:
|
|
$(MAKE) -C $(CVSBASE) packages_install $(INSTALLOPTS)
|
|
|
|
|
|
zipinstall: build \
|
|
zipinstallbase zipinstallapi zipinstallfcl \
|
|
zipinstallpackages
|
|
|
|
|
|
##########################################################################
|
|
# go32v2,win32 specific targets
|
|
##########################################################################
|
|
|
|
.PHONY: go32v2 win32
|
|
|
|
go32v2:
|
|
$(MAKE) zipinstall OS_TARGET=go32v2
|
|
|
|
win32:
|
|
$(MAKE) zipinstall OS_TARGET=win32
|
|
|