mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 19:29:24 +02:00
* removed obsolete makefiles
This commit is contained in:
parent
347a146da3
commit
67121a8e17
31
base/makefile.txt
Normal file
31
base/makefile.txt
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
First you need to install all the sources like:
|
||||
|
||||
<basedir>/
|
||||
base
|
||||
compiler
|
||||
rtl
|
||||
ide/text
|
||||
ide/fake
|
||||
api
|
||||
fv
|
||||
gdbint
|
||||
gdbint/libgdb
|
||||
|
||||
- Copy the files (Makefile,makefile.fpc) from the base/ directory to the
|
||||
<basedir>.
|
||||
|
||||
- get the libgdb_<system>.zip from tflily ftp and unzip it in the
|
||||
gdbint/libgdb directory
|
||||
|
||||
- Type: SET FPCDIR=<basedir>
|
||||
|
||||
- Then you can type 'make info' and see it finds the correct files.
|
||||
|
||||
- When that works fine, then you can type in the <basedir>:
|
||||
|
||||
'make ide_all' IDE without compiler/debugger
|
||||
'make ide_gdb' IDE with debugger
|
||||
'make ide_full' IDE with compiler
|
||||
'make ide_fullgdb' IDE with compiler/debugger
|
||||
|
@ -31,4 +31,5 @@ Changes in the syntax or semantic of FPC:
|
||||
set the searchpaths where to find the files for that module (PFV)
|
||||
25/03/99 new directive STATIC +/- or on/off , works like -St commandline
|
||||
switch
|
||||
02/04/99 rtl/cfg/ directory has been removed, it's not used anymore
|
||||
|
||||
|
@ -1,83 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (c) 1998 by the Free Pascal Development Team
|
||||
#
|
||||
# Makefile for <template>
|
||||
#
|
||||
# See the file COPYING.FPC, included in this distribution,
|
||||
# for details about the copyright.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#####################################################################
|
||||
# Defaults
|
||||
#####################################################################
|
||||
|
||||
# Where are the include files located
|
||||
INC=
|
||||
PROCINC=
|
||||
OSINC=
|
||||
|
||||
# Needed options, without it won't compile
|
||||
NEEDOPT=
|
||||
|
||||
# Needed unit dir, which is searched as the first path
|
||||
NEEDUNITDIR=
|
||||
|
||||
# Where need we to place the executables/ppu/objects
|
||||
TARGETDIR=
|
||||
UNITTARGETDIR=
|
||||
|
||||
# As default make only the units
|
||||
#DEFAULTUNITS=1
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Real targets
|
||||
#####################################################################
|
||||
|
||||
UNITOBJECTS=
|
||||
EXEOBJECTS=
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Include default makefile
|
||||
#####################################################################
|
||||
|
||||
ifndef FPCMAKE
|
||||
ifdef FPCDIR
|
||||
FPCMAKE=$(FPCDIR)/makefile.fpc
|
||||
else
|
||||
FPCMAKE=makefile.fpc
|
||||
endif
|
||||
endif
|
||||
|
||||
override FPCMAKE:=$(strip $(wildcard $(FPCMAKE)))
|
||||
ifeq ($(FPCMAKE),)
|
||||
nofpcmake:
|
||||
@echo
|
||||
@echo makefile.fpc not found!
|
||||
@echo Check the FPCMAKE and FPCDIR environment variables.
|
||||
@echo
|
||||
@exit
|
||||
else
|
||||
include $(FPCMAKE)
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Dependencies
|
||||
#####################################################################
|
||||
|
||||
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.4 1999-01-19 18:21:51 peter
|
||||
# * Use FPCDIR and FPCMAKE environment to find makefile.fpc
|
||||
# * better install dir setting
|
||||
#
|
||||
#
|
||||
#
|
@ -1,149 +0,0 @@
|
||||
|
||||
Possible settings for common Free Pascal Makefile:
|
||||
|
||||
General configurable settings:
|
||||
------------------------------
|
||||
OS_TARGET The target operating system you are going to compile for
|
||||
(Note: This has autodetection for go32v2,linux,winnt)
|
||||
|
||||
OS_SOURCE The source operating system you compiling under
|
||||
(Note: This has autodetection for go32v2,linux,winnt)
|
||||
|
||||
CPU The target CPU that is used (currently m68k,i386)
|
||||
Default: CPU=i386
|
||||
|
||||
OPT General commandline options you want to give
|
||||
Example to compile with debug info: OPT=-g
|
||||
|
||||
OPTDEF Commandline defines, which also need to be passed to
|
||||
programs that don't want other options (like mkdep)
|
||||
|
||||
NEEDOPT Realy needed commandline options, also used when
|
||||
RELEASE=1. Example: NEEDOPT=-Sg to allow goto
|
||||
|
||||
NEEDUNITDIR Realy needed unitdir
|
||||
|
||||
PP compiler to use, default is ppc386
|
||||
Example to compile with version 0.99.8: PP=ppc998
|
||||
|
||||
AS assembler to use to compile the loaders
|
||||
Default: AS=as
|
||||
|
||||
LD linker to use
|
||||
Default: LD=ld
|
||||
|
||||
RELEASE setting this to a value (for example RELEASE=1) will compile
|
||||
for a release, no ppc386.cfg is read an compile is done with
|
||||
the following settings: '-Xs -OG2p2 -n'
|
||||
|
||||
VERBOSE setting this to a value (for example VERBOSE=1) will compile
|
||||
with more verbosity, this can be used in combination with
|
||||
the RELEASE option. Verbosity used: '-vwni'
|
||||
|
||||
SMARTLINK setting this to YES will create smartlinked files
|
||||
Example: SMARTLINK=YES
|
||||
|
||||
LIBNAME set the outputname for the library to LIBNAME, mostly used
|
||||
in combination with SMARTLINK to create a one library which
|
||||
contains all units
|
||||
Example: LIBNAME=objpas SMARTLINK=yes
|
||||
|
||||
LIBTYPE can be set to shared or static to set the library type you
|
||||
want to create. When shared is set it overrides smartlink
|
||||
and turns it off.
|
||||
Example: LIBTYPE=shared LIBNAME=objpas
|
||||
|
||||
DEFAULTUNITS if this is set then a 'make all' will only compile the units
|
||||
and not the exes
|
||||
|
||||
NODEFAULTRULES Don't include the default compiler rules. This is needed for
|
||||
top-makefiles which call other files in subdirs
|
||||
|
||||
|
||||
Location:
|
||||
---------
|
||||
INC Where to find the .inc files.
|
||||
Example: INC=inc
|
||||
|
||||
PROCINC Where to find processor dependent .inc files
|
||||
Example: PROCINC=$(CPU)
|
||||
|
||||
OSINC Where to find operating system dependent .inc files
|
||||
Example: OSINC=$(OS_TARGET)
|
||||
|
||||
TARGETDIR Where to place all the .o,.ppu,.exe files
|
||||
Example: TARGETDIR=. (this is needed when you compile
|
||||
a unit from an other dir, but want the .ppu,.o in the
|
||||
current directory)
|
||||
|
||||
UNITTARGETDIR Where to place the .o,.ppu files, this overrides the
|
||||
TARGETDIR setting for these files.
|
||||
Example see TARGETDIR
|
||||
|
||||
|
||||
File Handling:
|
||||
--------------
|
||||
MOVE Command to move files
|
||||
COPY Command to copy files
|
||||
DEL Command to delete files
|
||||
DELTREE Command to delete a whole directory tree
|
||||
INSTALL Command to install a normal file (not executable)
|
||||
INSTALLEXE Command to install an executable file
|
||||
MKDIR Command to make a new directory
|
||||
|
||||
|
||||
Tools:
|
||||
------
|
||||
LDCONFIG command to rebuild the ld.so.cache (automaticly set for linux)
|
||||
PPAS ppas.sh for linux, other os's ppas.bat
|
||||
PPUMOVE PPUMove program
|
||||
DIFF GNU Diff
|
||||
DATE GNU Date (automaticly searched)
|
||||
SED GNU Sed (automaticly searched)
|
||||
PWD GNU PWD (automaticly searched)
|
||||
|
||||
|
||||
Directories:
|
||||
-----------
|
||||
BASEDIR Current working directory (automaticly loaded using PWD)
|
||||
|
||||
FPCDIR Base directory of Free Pascal
|
||||
|
||||
RTLDIR Directory to the used RTL. This contains already the target
|
||||
Default: $FPCDIR/rtl/$OS_TARGET
|
||||
|
||||
UNITDIR Directory to the currently used units for the target
|
||||
Default: $FPCDIR/units/$OS_TARGET
|
||||
|
||||
|
||||
Installation directories:
|
||||
-------------------------
|
||||
BASEINSTALLDIR Base directory where to install all the files.
|
||||
Default: /pp (linux: /usr/lib/fpc/$VER)
|
||||
|
||||
LIBINSTALLDIR Directory to install all libraries
|
||||
Default: $BASEINSTALLDIR/lib (linux: $BASEINSTALLDIR)
|
||||
|
||||
BININSTALLDIR Directory where to install the binaries
|
||||
Default: $BASEINSTALLDIR/bin/$OS_TARGET (linux: /usr/bin)
|
||||
|
||||
UNITINSTALLDIR Directory where to install the normal units
|
||||
Default: $BASEINSTALLDIR/rtl/$OS_TARGET
|
||||
|
||||
STATIC_UNITINSTALLDIR Directory where to install static (smartlinked) units
|
||||
Default: $BASEINSTALLDIR/rtl/$OS_TARGET/static
|
||||
|
||||
SHARED_UNITINSTALLDIR Directory where to install shared linked units
|
||||
Default: $BASEINSTALLDIR/rtl/$OS_TARGET/shared
|
||||
|
||||
STATIC_LIBINSTALLDIR Directory where to install static linked libraries
|
||||
Default: $STATIC_UNITINSTALLDIR
|
||||
|
||||
SHARED_LIBINSTALLDIR Directory where to install shared linked libraries
|
||||
Default: $SHARED_UNITINSTALLDIR (linux: /usr/lib)
|
||||
|
||||
MSGINSTALLDIR Directory where to place the .msg (language) files
|
||||
Default: $BASEINSTALLDIR/msg
|
||||
|
||||
DOCINSTALLDIR: Directory where to install the documentation
|
||||
Default: $BASEINSTALLDIR/doc (linux: /usr/doc/fpc/$VER)
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo '# automatically generated dependencies.' >depend
|
||||
echo >>depend
|
||||
for f in $*
|
||||
do
|
||||
mkdep $f | sed -n 1,/\^\$/p >>depend
|
||||
done
|
@ -1,749 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (c) 1998 by the Free Pascal Development Team
|
||||
#
|
||||
# Common makefile for Free Pascal
|
||||
#
|
||||
# See the file COPYING.FPC, included in this distribution,
|
||||
# for details about the copyright.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
#####################################################################
|
||||
# Force default settings
|
||||
#####################################################################
|
||||
|
||||
# Latest release version
|
||||
override RELEASEVER:=0.99.11
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Autodetect OS (Linux or Dos or Windows NT)
|
||||
# define inlinux when running under linux
|
||||
# define inWinNT when running under WinNT
|
||||
#####################################################################
|
||||
|
||||
PWD=$(strip $(wildcard $(addsuffix /pwd.exe,$(subst ;, ,$(PATH)))))
|
||||
ifeq ($(PWD),)
|
||||
PWD=$(strip $(wildcard $(addsuffix /pwd,$(subst :, ,$(PATH)))))
|
||||
ifeq ($(PWD),)
|
||||
nopwd:
|
||||
@echo
|
||||
@echo You need the GNU pwd,cp,mv,rm,install utils to use this makefile!
|
||||
@echo Get ftp://tflily.fys.kuleuven.ac.be/pub/fpc/dist/gnuutils.zip
|
||||
@echo
|
||||
@exit
|
||||
else
|
||||
inlinux=1
|
||||
endif
|
||||
else
|
||||
PWD:=$(subst \,/,$(firstword $(PWD)))
|
||||
endif
|
||||
|
||||
# Detect NT - NT sets OS to Windows_NT
|
||||
ifndef inlinux
|
||||
ifeq ($(OS),Windows_NT)
|
||||
inWinNT=1
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Check for FPCDIR environment
|
||||
#####################################################################
|
||||
|
||||
ifndef FPCDIR
|
||||
nofpcdir:
|
||||
@echo
|
||||
@echo You need to set the FPCDIR environment variable to use
|
||||
@echo this Makefile.
|
||||
@echo Example: SET FPCDIR=/pp
|
||||
@echo
|
||||
@exit
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Targets
|
||||
#####################################################################
|
||||
|
||||
# Target OS
|
||||
ifndef OS_TARGET
|
||||
ifdef inlinux
|
||||
OS_TARGET=linux
|
||||
else
|
||||
ifdef inWinNT
|
||||
OS_TARGET=win32
|
||||
else
|
||||
OS_TARGET=go32v2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Source OS
|
||||
ifndef OS_SOURCE
|
||||
ifdef inlinux
|
||||
OS_SOURCE=linux
|
||||
else
|
||||
ifndef inWinNT
|
||||
OS_SOURCE=win32
|
||||
else
|
||||
OS_SOURCE=go32v2
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# CPU
|
||||
ifndef CPU
|
||||
CPU=i386
|
||||
endif
|
||||
|
||||
# Options
|
||||
ifndef OPT
|
||||
OPT=
|
||||
endif
|
||||
|
||||
# What compiler to use ?
|
||||
ifndef PP
|
||||
PP=ppc386
|
||||
endif
|
||||
|
||||
# assembler, redefine it if cross compiling
|
||||
ifndef AS
|
||||
AS=as
|
||||
endif
|
||||
|
||||
# linker, but probably not used
|
||||
ifndef LD
|
||||
LD=ld
|
||||
endif
|
||||
|
||||
# Release ? Then force OPT and don't use extra opts via commandline
|
||||
ifdef RELEASE
|
||||
override OPT:=-Xs -OG2p2 -n
|
||||
endif
|
||||
|
||||
# Verbose settings (warning,note,info)
|
||||
ifdef VERBOSE
|
||||
override OPT+=-vwni
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Shell commands
|
||||
#####################################################################
|
||||
|
||||
# To copy pograms
|
||||
ifndef COPY
|
||||
COPY=cp -fp
|
||||
endif
|
||||
|
||||
# To move pograms
|
||||
ifndef MOVE
|
||||
MOVE=mv -f
|
||||
endif
|
||||
|
||||
# Check delete program
|
||||
ifndef DEL
|
||||
DEL=rm -f
|
||||
endif
|
||||
|
||||
# Check deltree program
|
||||
ifndef DELTREE
|
||||
DELTREE=rm -rf
|
||||
endif
|
||||
|
||||
# To install files
|
||||
ifndef INSTALL
|
||||
ifdef inlinux
|
||||
INSTALL=install -m 644
|
||||
else
|
||||
INSTALL=$(COPY)
|
||||
# ginstall has the strange thing to stubify all .o files !
|
||||
#INSTALL=ginstall -m 644
|
||||
endif
|
||||
endif
|
||||
|
||||
# To install programs
|
||||
ifndef INSTALLEXE
|
||||
ifdef inlinux
|
||||
INSTALLEXE=install -m 755
|
||||
else
|
||||
INSTALLEXE=$(COPY)
|
||||
# ginstall has the strange thing to stubify all .o files !
|
||||
#INSTALLEXE=ginstall -m 755
|
||||
endif
|
||||
endif
|
||||
|
||||
# To make a directory.
|
||||
ifndef MKDIR
|
||||
ifdef inlinux
|
||||
MKDIR=install -m 755 -d
|
||||
else
|
||||
MKDIR=ginstall -m 755 -d
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Default Tools
|
||||
#####################################################################
|
||||
|
||||
# ppas.bat / ppas.sh
|
||||
ifdef inlinux
|
||||
PPAS=ppas.sh
|
||||
else
|
||||
PPAS=ppas.bat
|
||||
endif
|
||||
|
||||
# ldconfig to rebuild .so cache
|
||||
ifdef inlinux
|
||||
LDCONFIG=ldconfig
|
||||
else
|
||||
LDCONFIG=
|
||||
endif
|
||||
|
||||
# Where is the ppumove program ?
|
||||
ifndef PPUMOVE
|
||||
PPUMOVE=ppumove
|
||||
endif
|
||||
|
||||
# diff
|
||||
ifndef DIFF
|
||||
DIFF=diff
|
||||
endif
|
||||
|
||||
# date
|
||||
ifndef DATE
|
||||
# first try go32v2 specific gdate
|
||||
DATE=$(strip $(wildcard $(addsuffix /gdate.exe,$(subst ;, ,$(PATH)))))
|
||||
# try generic date.exe
|
||||
ifeq ($(DATE),)
|
||||
DATE=$(strip $(wildcard $(addsuffix /date.exe,$(subst ;, ,$(PATH)))))
|
||||
# finally try for linux
|
||||
ifeq ($(DATE),)
|
||||
DATE=$(strip $(wildcard $(addsuffix /date,$(subst :, ,$(PATH)))))
|
||||
ifeq ($(DATE),)
|
||||
DATE=
|
||||
endif
|
||||
else
|
||||
DATE:=$(subst \,/,$(firstword $(DATE)))
|
||||
endif
|
||||
else
|
||||
DATE:=$(subst \,/,$(firstword $(DATE)))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Sed
|
||||
ifndef SED
|
||||
SED=$(strip $(wildcard $(addsuffix /sed.exe,$(subst ;, ,$(PATH)))))
|
||||
ifeq ($(SED),)
|
||||
SED=$(strip $(wildcard $(addsuffix /sed,$(subst :, ,$(PATH)))))
|
||||
ifeq ($(SED),)
|
||||
SED=
|
||||
endif
|
||||
else
|
||||
SED:=$(subst \,/,$(firstword $(SED)))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Default Directories
|
||||
#####################################################################
|
||||
|
||||
# Base dir
|
||||
ifdef PWD
|
||||
BASEDIR=$(shell $(PWD))
|
||||
endif
|
||||
|
||||
# set the directory to the rtl base
|
||||
ifndef RTLDIR
|
||||
ifdef RTL
|
||||
RTLDIR=$(RTL)/$(OS_TARGET)
|
||||
else
|
||||
RTLDIR:=$(FPCDIR)/rtl/$(OS_TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
# specify where units are.
|
||||
ifndef UNITDIR
|
||||
ifdef UNITS
|
||||
UNITDIR=$(UNITS)/$(OS_TARGET)
|
||||
else
|
||||
UNITDIR=$(FPCDIR)/units/$(OS_TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
# set the prefix directory where to install everything
|
||||
ifndef PREFIXINSTALLDIR
|
||||
ifdef inlinux
|
||||
PREFIXINSTALLDIR=/usr
|
||||
else
|
||||
PREFIXINSTALLDIR=$(FPCDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# set the base directory where to install everything
|
||||
ifndef BASEINSTALLDIR
|
||||
ifdef inlinux
|
||||
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(RELEASEVER)
|
||||
else
|
||||
BASEINSTALLDIR=$(PREFIXINSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Install Directories based on BASEINSTALLDIR
|
||||
#####################################################################
|
||||
|
||||
# Linux binary really goes to baseinstalldir
|
||||
ifndef LIBINSTALLDIR
|
||||
ifdef inlinux
|
||||
LIBINSTALLDIR=$(BASEINSTALLDIR)
|
||||
else
|
||||
LIBINSTALLDIR=$(BASEINSTALLDIR)/lib
|
||||
endif
|
||||
endif
|
||||
|
||||
# set the directory where to install the binaries
|
||||
ifndef BININSTALLDIR
|
||||
ifdef inlinux
|
||||
BININSTALLDIR=$(PREFIXINSTALLDIR)/bin
|
||||
else
|
||||
BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Where the .msg files will be stored
|
||||
ifndef MSGINSTALLDIR
|
||||
ifdef inlinux
|
||||
MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
|
||||
else
|
||||
MSGINSTALLDIR=$(BININSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Where the doc files will be stored
|
||||
ifndef DOCINSTALLDIR
|
||||
ifdef inlinux
|
||||
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc/$(RELEASEVER)
|
||||
else
|
||||
DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
|
||||
endif
|
||||
endif
|
||||
|
||||
########################
|
||||
# Unit Directories
|
||||
########################
|
||||
|
||||
# this can be set to 'rtl' when the RTL units are installed
|
||||
ifndef UNITPREFIX
|
||||
ifndef inlinux
|
||||
UNITPREFIX=units
|
||||
else
|
||||
UNITPREFIX=linuxunits
|
||||
endif
|
||||
endif
|
||||
# set the directory where to install the units.
|
||||
ifndef UNITINSTALLDIR
|
||||
ifdef inlinux
|
||||
UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)
|
||||
else
|
||||
UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
|
||||
endif
|
||||
endif
|
||||
|
||||
# set the directory where to install the units.
|
||||
ifndef STATIC_UNITINSTALLDIR
|
||||
STATIC_UNITINSTALLDIR=$(UNITINSTALLDIR)/static
|
||||
endif
|
||||
|
||||
# set the directory where to install the units.
|
||||
ifndef SHARED_UNITINSTALLDIR
|
||||
SHARED_UNITINSTALLDIR=$(UNITINSTALLDIR)/shared
|
||||
endif
|
||||
|
||||
# set the directory where to install the libs (must exist)
|
||||
ifndef STATIC_LIBINSTALLDIR
|
||||
STATIC_LIBINSTALLDIR=$(STATIC_UNITINSTALLDIR)
|
||||
endif
|
||||
|
||||
# set the directory where to install the libs (must exist)
|
||||
ifndef SHARED_LIBINSTALLDIR
|
||||
ifdef inlinux
|
||||
SHARED_LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
|
||||
else
|
||||
SHARED_LIBINSTALLDIR=$(SHARED_UNITINSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Compiler Command Line
|
||||
#####################################################################
|
||||
|
||||
# Load commandline OPTDEF and add CPU define
|
||||
override PPOPTDEF:=$(OPTDEF) -d$(CPU)
|
||||
|
||||
# Load commandline OPT and add target and unit dir to be sure
|
||||
override PPOPT:=$(OPT) -T$(OS_TARGET) $(NEEDOPT)
|
||||
|
||||
# RTL first and then Unit dir (a unit can override RTLunit)
|
||||
ifdef RTLDIR
|
||||
override PPOPT+=$(addprefix -Fu,$(RTLDIR))
|
||||
endif
|
||||
ifdef UNITDIR
|
||||
override PPOPT+=$(addprefix -Fu,$(UNITDIR))
|
||||
endif
|
||||
ifdef NEEDUNITDIR
|
||||
override PPOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
|
||||
endif
|
||||
|
||||
# Add include dirs INC and PROCINC and OSINC
|
||||
ifdef INC
|
||||
override PPOPT+=-I$(INC)
|
||||
endif
|
||||
ifdef PROCINC
|
||||
override PPOPT+=-I$(PROCINC)
|
||||
endif
|
||||
ifdef OSINC
|
||||
override PPOPT+=-I$(OSINC)
|
||||
endif
|
||||
|
||||
# Target dirs
|
||||
ifdef TARGETDIR
|
||||
override PPOPT+=-FE$(TARGETDIR)
|
||||
endif
|
||||
ifdef UNITTARGETDIR
|
||||
override PPOPT+=-FU$(UNITTARGETDIR)
|
||||
endif
|
||||
|
||||
# Smartlinking
|
||||
ifeq ($(SMARTLINK),YES)
|
||||
ifeq ($(LIBTYPE),shared)
|
||||
override SMARTLINK=NO
|
||||
else
|
||||
override PPOPT+=-Cx
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add library type, for static libraries smartlinking is automatic used
|
||||
ifeq ($(LIBTYPE),shared)
|
||||
override PPOPT+=-CD
|
||||
else
|
||||
ifeq ($(LIBTYPE),static)
|
||||
override PPOPT+=-CS
|
||||
endif
|
||||
endif
|
||||
|
||||
# Add library name
|
||||
ifneq ($(LIBNAME),)
|
||||
override PPOPT:=$(PPOPT) -o$(LIBNAME)
|
||||
endif
|
||||
|
||||
# Add defines from PPOPTDEF to PPOPT
|
||||
override PPOPT:=$(PPOPT) $(PPOPTDEF)
|
||||
|
||||
# Was a config file specified ?
|
||||
ifdef CFGFILE
|
||||
override PPOPT:=$(PPOPT) @$(CFGFILE)
|
||||
endif
|
||||
|
||||
override COMPILER=$(PP) $(PPOPT)
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Default extensions
|
||||
#####################################################################
|
||||
|
||||
# Default needed extensions (Go32v2,Linux)
|
||||
PPLEXT=.ppl
|
||||
PPUEXT=.ppu
|
||||
OEXT=.o
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.so
|
||||
|
||||
# Executable extension
|
||||
ifdef inlinux
|
||||
EXEEXT=
|
||||
else
|
||||
EXEEXT=.exe
|
||||
endif
|
||||
|
||||
# Go32v1
|
||||
ifeq ($(OS_TARGET),go32v1)
|
||||
PPUEXT=.pp1
|
||||
OEXT=.o1
|
||||
ASMEXT=.s1
|
||||
SMARTEXT=.sl1
|
||||
STATICLIBEXT=.a1
|
||||
SHAREDLIBEXT=.so1
|
||||
endif
|
||||
|
||||
# Win32
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
PPUEXT=.ppw
|
||||
OEXT=.ow
|
||||
ASMEXT=.sw
|
||||
SMARTEXT=.slw
|
||||
STATICLIBEXT=.aw
|
||||
SHAREDLIBEXT=.dll
|
||||
endif
|
||||
|
||||
# OS/2
|
||||
ifeq ($(OS_TARGET),os2)
|
||||
PPUEXT=.ppo
|
||||
ASMEXT=.so2
|
||||
OEXT=.o2
|
||||
SMARTEXT=.so
|
||||
STATICLIBEXT=.ao
|
||||
SHAREDLIBEXT=.dll
|
||||
endif
|
||||
|
||||
# determine libary extension.
|
||||
ifeq ($(LIBTYPE),static)
|
||||
LIBEXT=$(STATICLIBEXT)
|
||||
else
|
||||
LIBEXT=$(SHAREDLIBEXT)
|
||||
endif
|
||||
|
||||
# library prefix
|
||||
LIBPREFIX=lib
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
LIBPREFIX=
|
||||
endif
|
||||
ifeq ($(OS_TARGET),go32v1)
|
||||
LIBPREFIX=
|
||||
endif
|
||||
|
||||
# determine with .pas extension is used
|
||||
ifdef EXEOBJECTS
|
||||
override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(EXEOBJECTS)))))
|
||||
else
|
||||
override TESTPAS:=$(strip $(wildcard $(addsuffix .pas,$(firstword $(UNITOBJECTS)))))
|
||||
endif
|
||||
|
||||
ifeq ($(TESTPAS),)
|
||||
PASEXT=.pp
|
||||
else
|
||||
PASEXT=.pas
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Export commandline values, so nesting use the same values
|
||||
#####################################################################
|
||||
|
||||
export FPCDIR FPCMAKE
|
||||
export RELEASEVER OS_SOURCE OS_TARGET OPT OPTDEF CPU PP RELEASE VERBOSE
|
||||
export SMARTLINK LIBTYPE LIBNAME
|
||||
export BASEINSTALLDIR
|
||||
|
||||
|
||||
#####################################################################
|
||||
# General compile rules
|
||||
#####################################################################
|
||||
|
||||
ifndef NODEFAULTRULES
|
||||
|
||||
# Create Filenames
|
||||
EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
|
||||
EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
|
||||
UNITFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
|
||||
UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
|
||||
|
||||
.PHONY : all clean install \
|
||||
info cfginfo objectinfo installinfo filesinfo
|
||||
|
||||
.SUFFIXES : $(EXEEXT) $(PPUEXT) $(PASEXT)
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Default
|
||||
#####################################################################
|
||||
|
||||
ifdef DEFAULTUNITS
|
||||
all: units
|
||||
else
|
||||
all: units exes
|
||||
endif
|
||||
|
||||
units: $(UNITFILES)
|
||||
|
||||
exes: $(EXEFILES)
|
||||
|
||||
# General compile rules
|
||||
%$(PPUEXT): %$(PASEXT)
|
||||
$(COMPILER) $<
|
||||
|
||||
%$(EXEEXT): %$(PASEXT)
|
||||
$(COMPILER) $<
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Library
|
||||
#####################################################################
|
||||
|
||||
staticlib:
|
||||
$(MAKE) libsclean
|
||||
$(MAKE) all SMARTLINK=YES LIBTYPE=static
|
||||
|
||||
|
||||
sharedlib:
|
||||
ifdef inlinux
|
||||
$(MAKE) libsclean
|
||||
$(MAKE) all LIBTYPE=shared
|
||||
else
|
||||
@echo Shared Libraries not supported
|
||||
endif
|
||||
|
||||
|
||||
libsclean : clean
|
||||
-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Install rules
|
||||
#####################################################################
|
||||
|
||||
install : all
|
||||
ifndef DEFAULTUNITS
|
||||
ifdef EXEOBJECTS
|
||||
$(MKDIR) $(BININSTALLDIR)
|
||||
$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
ifdef UNITOBJECTS
|
||||
$(MKDIR) $(UNITINSTALLDIR)
|
||||
$(INSTALL) $(UNITFILES) $(UNITINSTALLDIR)
|
||||
ifeq ($(SMARTLINK),YES)
|
||||
$(INSTALL) $(LIBPREFIX)$(LIBNAME)$(LIBEXT) $(UNITINSTALLDIR)
|
||||
else
|
||||
-$(INSTALL) $(UNITOFILES) $(UNITINSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
staticlibinstall: staticlib
|
||||
$(MKDIR) $(STATIC_UNITINSTALLDIR)
|
||||
$(INSTALL) $(UNITFILES) $(STATIC_UNITINSTALLDIR)
|
||||
$(MKDIR) $(STATIC_LIBINSTALLDIR)
|
||||
$(INSTALLEXE) *$(STATICLIBEXT) $(STATIC_LIBINSTALLDIR)
|
||||
|
||||
|
||||
sharedlibinstall: sharedlib
|
||||
$(MKDIR) $(SHARED_UNITINSTALLDIR)
|
||||
$(INSTALL) $(UNITFILES) $(SHARED_UNITINSTALLDIR)
|
||||
$(MKDIR) $(SHARED_LIBINSTALLDIR)
|
||||
$(INSTALLEXE) *$(SHAREDLIBEXT) $(SHARED_LIBINSTALLDIR)
|
||||
|
||||
|
||||
libinstall: staticlibinstall sharedlibinstall
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Clean rules
|
||||
#####################################################################
|
||||
|
||||
clean:
|
||||
-$(DEL) $(UNITOFILES) $(UNITFILES) $(PPAS) link.res log
|
||||
ifeq ($(SMARTLINK),YES)
|
||||
-$(DELTREE) *$(SMARTEXT)
|
||||
endif
|
||||
ifdef EXEOBJECTS
|
||||
-$(DEL) $(EXEFILES) $(EXEOFILES)
|
||||
endif
|
||||
ifdef EXTRACLEAN
|
||||
-$(DEL) $(EXTRACLEAN)
|
||||
endif
|
||||
|
||||
#####################################################################
|
||||
# Depend rules
|
||||
#####################################################################
|
||||
|
||||
depend:
|
||||
makedep $(UNITOBJECTS)
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Info rules
|
||||
#####################################################################
|
||||
|
||||
info: cfginfo objectinfo installinfo
|
||||
|
||||
cfginfo:
|
||||
@echo
|
||||
@echo == Configuration info ==
|
||||
@echo
|
||||
@echo FPCDir.... $(FPCDIR)
|
||||
@echo FPCMake... $(FPCMAKE)
|
||||
@echo
|
||||
@echo Target.... $(OS_TARGET)
|
||||
@echo Source.... $(OS_SOURCE)
|
||||
@echo Target.... $(OS_TARGET)
|
||||
@echo Basedir... $(BASEDIR)
|
||||
@echo Pwd....... $(PWD)
|
||||
ifdef SED
|
||||
@echo Sed....... $(SED)
|
||||
endif
|
||||
@echo
|
||||
|
||||
objectinfo:
|
||||
@echo
|
||||
@echo == Object info ==
|
||||
@echo
|
||||
@echo UnitObjects... $(UNITOBJECTS)
|
||||
@echo ExeObjects.... $(EXEOBJECTS)
|
||||
@echo
|
||||
|
||||
installinfo:
|
||||
@echo
|
||||
@echo == Install info ==
|
||||
@echo
|
||||
@echo BaseInstallDir....... $(BASEINSTALLDIR)
|
||||
@echo BinInstallDir........ $(BININSTALLDIR)
|
||||
@echo UnitInstallDir....... $(UNITINSTALLDIR)
|
||||
@echo StaticUnitInstallDir. $(STATIC_UNITINSTALLDIR)
|
||||
@echo SharedUnitInstallDir. $(SHARED_UNITINSTALLDIR)
|
||||
@echo LibInstallDir........ $(LIBINSTALLDIR)
|
||||
@echo StaticLibInstallDir.. $(STATIC_LIBINSTALLDIR)
|
||||
@echo SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR)
|
||||
@echo MsgInstallDir........ $(MSGINSTALLDIR)
|
||||
@echo DocInstallDir........ $(DOCINSTALLDIR)
|
||||
@echo
|
||||
|
||||
# try to get the files in the currentdir
|
||||
PASFILES:=$(wildcard *.pas)
|
||||
PPFILES:=$(wildcard *.pp)
|
||||
INCFILES:=$(wildcard *.inc)
|
||||
MSGFILES:=$(wildcard *.msg)
|
||||
ASFILES:=$(wildcard *.as)
|
||||
|
||||
filesinfo:
|
||||
@echo
|
||||
@echo == Files info ==
|
||||
@echo
|
||||
ifdef PASFILES
|
||||
@echo Pas files are $(PASFILES)
|
||||
endif
|
||||
ifdef PPFILES
|
||||
@echo PP files are $(PPFILES)
|
||||
endif
|
||||
ifdef INCFILES
|
||||
@echo Inc files are $(INCFILES)
|
||||
endif
|
||||
ifdef MSGFILES
|
||||
@echo Msg files are $(MSGFILES)
|
||||
endif
|
||||
ifdef ASFILES
|
||||
@echo As files are $(ASFILES)
|
||||
endif
|
||||
|
||||
endif #NODEFAULTRULES
|
@ -1,134 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
# This file is part of the Free Pascal run time library.
|
||||
# Copyright (c) 1998 by the Free Pascal Development Team
|
||||
#
|
||||
# Makefile for the <Template>
|
||||
#
|
||||
# See the file COPYING.FPC, included in this distribution,
|
||||
# for details about the copyright.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Warning: this file contains TAB (#9) characters that are required for
|
||||
# make. Make sure you use an editor that does not replace TABs with
|
||||
# spaces, or the makefile won't work anymore after you save.
|
||||
|
||||
#####################################################################
|
||||
# Defaults
|
||||
#####################################################################
|
||||
|
||||
# Where are the include files ?
|
||||
RTL=..
|
||||
CFG=$(RTL)/cfg
|
||||
#INC=$(RTL)/inc
|
||||
#PROCINC=$(RTL)/$(CPU)
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Include configuration makefile
|
||||
#####################################################################
|
||||
|
||||
# Get some defaults for Programs and OSes.
|
||||
# This will at least set the following variables :
|
||||
# inlinux COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
|
||||
# INSTALLDIR UNITDIR PPOPT PP CPU COMPILER
|
||||
include $(CFG)/makefile.cfg
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Objects
|
||||
#####################################################################
|
||||
|
||||
EXEOBJECTS=
|
||||
UNITOBJECTS=
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Main targets
|
||||
#####################################################################
|
||||
|
||||
# Create Filenames
|
||||
EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
|
||||
UNITFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
|
||||
UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
|
||||
|
||||
.PHONY : all clean diffs install diffclean
|
||||
|
||||
|
||||
all : $(EXEFILES) $(UNITFILES) targetdir
|
||||
|
||||
$(EXEFILES): %$(EXEEXT): %$(PASEXT)
|
||||
$(COMPILER) $*
|
||||
|
||||
$(UNITFILES): %$(PPUEXT): %$(PASEXT)
|
||||
$(COMPILER) $*
|
||||
|
||||
|
||||
targetdir:
|
||||
ifdef UNITTARGETDIR
|
||||
ifdef EXEOBJECTS
|
||||
$(COPY) $(EXEFILES) $(BINTARGETDIR)
|
||||
endif
|
||||
endif
|
||||
ifdef UNITTARGETDIR
|
||||
ifdef UNITOBJECTS
|
||||
$(COPY) $(UNITFILES) $(UNITTARGETDIR)
|
||||
ifeq ($(SMARTLINK),YES)
|
||||
$(COPY) $(LIBPREFIX)$(LIBNAME)$(LIBEXT) $(UNITTARGETDIR)
|
||||
else
|
||||
$(COPY) $(UNITOFILES) $(UNITTARGETDIR)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
install : all
|
||||
ifdef EXEOBJECTS
|
||||
$(MKDIR) $(BININSTALLDIR)
|
||||
$(INSTALLEXE) $(EXEFILES) $(BININSTALLDIR)
|
||||
endif
|
||||
ifdef UNITOBJECTS
|
||||
$(MKDIR) $(UNITINSTALLDIR)
|
||||
ifeq ($(SMARTLINK),YES)
|
||||
$(INSTALL) $(LIBPREFIX)$(LIBNAME)$(LIBEXT) $(UNITINSTALLDIR)
|
||||
else
|
||||
$(INSTALL) $(UNITFILES) $(UNITOFILES) $(UNITINSTALLDIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
clean:
|
||||
-$(DEL) *$(OEXT) *$(ASMEXT) *$(PPUEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) $(PPAS) link.res log
|
||||
-$(DELTREE) *$(SMARTEXT)
|
||||
ifdef EXEOBJECTS
|
||||
-$(DEL) $(EXEFILES)
|
||||
endif
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Files
|
||||
#####################################################################
|
||||
|
||||
|
||||
#####################################################################
|
||||
# Default makefile targets
|
||||
#####################################################################
|
||||
|
||||
include $(CFG)/makefile.def
|
||||
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.3 1998-11-24 19:52:44 jonas
|
||||
# + added warning about TABs
|
||||
#
|
||||
# Revision 1.2 1998/09/16 16:47:30 peter
|
||||
# * merged fixes
|
||||
#
|
||||
# Revision 1.1.2.1 1998/09/16 16:17:53 peter
|
||||
# * updates to install with go32,win32
|
||||
#
|
||||
#
|
Loading…
Reference in New Issue
Block a user