mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-16 01:49:11 +02:00
Changed makefile system to use -I compiler option, and streamlined i a bit
This commit is contained in:
parent
6fc80b783f
commit
dbe0135764
7
rtl/i386/makefile.cpu
Normal file
7
rtl/i386/makefile.cpu
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#
|
||||||
|
# Here we set processor dependent include file names.
|
||||||
|
#
|
||||||
|
|
||||||
|
CPUNAMES=i386 heap math set
|
||||||
|
CPUINCNAMES=$(addsuffix .inc,$(CPUNAMES))
|
||||||
|
|
15
rtl/inc/makefile.inc
Normal file
15
rtl/inc/makefile.inc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Here we set some variables, needed by all OSes.
|
||||||
|
#
|
||||||
|
|
||||||
|
# System unit include files. These are composed from header and
|
||||||
|
# implementation files.
|
||||||
|
|
||||||
|
SYSNAMES=systemh heaph mathh filerec textrec system real2str sstrings innr file typefile version
|
||||||
|
SYSINCNAMES=$(addsuffix .inc,$(SYSNAMES))
|
||||||
|
|
||||||
|
# Other files...
|
||||||
|
#astrings.pp
|
||||||
|
#complex.pp
|
||||||
|
#cpne.pp
|
||||||
|
#lstrings.pp
|
@ -81,104 +81,48 @@ endif
|
|||||||
# Do not edit after this line.
|
# Do not edit after this line.
|
||||||
#####################################################################
|
#####################################################################
|
||||||
|
|
||||||
|
#####################################################################
|
||||||
|
# System independent
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
# Where are the include files ?
|
# Where are the include files ?
|
||||||
INC=../inc
|
INC=../inc
|
||||||
PROCINC=../$(CPU)
|
PROCINC=../$(CPU)
|
||||||
|
CFG=../cfg
|
||||||
OBJPASDIR=../objpas
|
OBJPASDIR=../objpas
|
||||||
|
|
||||||
# To copy pograms
|
# Get some defaults for Programs and OSes.
|
||||||
ifndef COPY
|
# This will set the following variables :
|
||||||
ifeq ($(DOS),YES)
|
# inlinux indos COPY REPLACE DEL INSTALL INSTALLEXE MKDIR
|
||||||
COPY=copy
|
# It will also set OPT for cross-compilation, and add required options.
|
||||||
else
|
# also checks for config file.
|
||||||
COPY=cp -p
|
# it expects INC PROCINC to be set !!
|
||||||
endif
|
include $(CFG)/makefile.cfg
|
||||||
endif
|
|
||||||
|
|
||||||
# Check delete program
|
# Get the system independent include file names.
|
||||||
ifndef DEL
|
# This will set the following variables :
|
||||||
ifeq ($(DOS),YES)
|
# SYSINCNAMES
|
||||||
DEL=del
|
include $(INC)/makefile.inc
|
||||||
else
|
SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
|
||||||
DEL=rm -f
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# To install files
|
# Get the processor dependent include file names.
|
||||||
ifndef INSTALL
|
# This will set the following variables :
|
||||||
ifeq ($(DOS),YES)
|
# CPUINCNAMES
|
||||||
INSTALL=copy
|
include $(PROCINC)/makefile.cpu
|
||||||
else
|
SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
|
||||||
INSTALL=install -m 644
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# To install programs
|
# Put system unit dependencies together.
|
||||||
ifndef INSTALLEXE
|
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
|
||||||
ifeq ($(DOS),YES)
|
|
||||||
INSTALLEXE=copy
|
|
||||||
else
|
|
||||||
INSTALLEXE=install -m 755
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# To make a directory.
|
#####################################################################
|
||||||
ifndef MKDIR
|
# System dependent
|
||||||
ifeq ($(DOS),YES)
|
#####################################################################
|
||||||
MKDIR=mkdir
|
|
||||||
else
|
|
||||||
MKDIR=install -m 755 -d
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# diff program
|
|
||||||
ifndef REFPATH
|
|
||||||
REFPATH=/usr/local/fpk/work/new/rtl
|
|
||||||
endif
|
|
||||||
ifndef DIFF
|
|
||||||
DIFF=diff
|
|
||||||
endif
|
|
||||||
ifndef DIFFOPTS
|
|
||||||
DIFFOPTS=-b -c
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# System independent Commandline Options
|
|
||||||
#
|
|
||||||
|
|
||||||
# Cross compiling ?
|
|
||||||
ifeq ($(OS_TARGET),$(OS_SRC))
|
|
||||||
CROSSCOMPILE=NO
|
|
||||||
else
|
|
||||||
CROSSCOMPILE=YES
|
|
||||||
endif
|
|
||||||
|
|
||||||
# add required options... (-dFPC is required for older versions)
|
|
||||||
override OPT:= $(OPT) -dFPC -d$(CPU)
|
|
||||||
|
|
||||||
# Was a config file specified ?
|
|
||||||
ifdef CFGFILE
|
|
||||||
override OPT:=$(OPT) @$(CFGFILE)
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Check for crosscompile
|
|
||||||
ifeq ($(CROSSCOMPILE),YES)
|
|
||||||
override OPT:= $(OPT) -dCROSSCOMPILE -T$(OS_TARGET)
|
|
||||||
endif
|
|
||||||
|
|
||||||
#
|
|
||||||
# System dependent Commandline Options
|
|
||||||
#
|
|
||||||
|
|
||||||
# Check if we need C library.
|
# Check if we need C library.
|
||||||
ifeq ($(LINK_TO_C),YES)
|
ifeq ($(LINK_TO_C),YES)
|
||||||
override OPT:=$(OPT) -dCRTLIB
|
override OPT:=$(OPT) -dCRTLIB
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
# System dependent
|
|
||||||
#####################################################################
|
|
||||||
|
|
||||||
# check whether we make shared or static libs
|
# check whether we make shared or static libs
|
||||||
ifndef LIBTYPE
|
ifndef LIBTYPE
|
||||||
LIBTYPE=shared
|
LIBTYPE=shared
|
||||||
@ -235,27 +179,9 @@ else
|
|||||||
LOADERS=lprt
|
LOADERS=lprt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
# System independent Makefile
|
|
||||||
#####################################################################
|
|
||||||
|
|
||||||
# OS Independent Depends
|
|
||||||
SYSTEMDEPS=system.inc systemh.inc mathh.inc real2str.inc \
|
|
||||||
heaph.inc innr.inc sstrings.inc file.inc
|
|
||||||
|
|
||||||
SYSTEMDEPS2=text.inc typefile.inc version.inc filerec.inc \
|
|
||||||
textrec.inc
|
|
||||||
|
|
||||||
# Processor Dependent Depends
|
|
||||||
SYSPROCDEPS=math.inc set.inc heap.inc $(CPU).inc
|
|
||||||
|
|
||||||
# Add Prefix and Suffixes
|
# Add Prefix and Suffixes
|
||||||
OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
|
OBJLOADERS=$(addsuffix $(OEXT), $(LOADERS))
|
||||||
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
|
PPUOBJECTS=$(addsuffix $(PPUEXT), $(OBJECTS))
|
||||||
DSYSTEMDEPS=$(addprefix $(INC)/, $(SYSTEMDEPS))
|
|
||||||
DSYSTEMDEPS2=$(addprefix $(INC)/, $(SYSTEMDEPS2))
|
|
||||||
DSYSPROCDEPS=$(addprefix $(PROCINC)/, $(SYSPROCDEPS))
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY : all install clean \
|
.PHONY : all install clean \
|
||||||
libs libsclean \
|
libs libsclean \
|
||||||
@ -291,14 +217,8 @@ lprt$(OEXT) : lprt.c
|
|||||||
# Base Units (System, strings, os-dependent-base-unit)
|
# Base Units (System, strings, os-dependent-base-unit)
|
||||||
#
|
#
|
||||||
|
|
||||||
$(SYSTEMPPU) : syslinux.pp $(SYSLINUXDEPS) $(DSYSTEMDEPS) $(DSYSPROCDEPS)
|
$(SYSTEMPPU) : syslinux.pp $(SYSLINUXDEPS) $(SYSDEPS)
|
||||||
$(COPY) $(DSYSTEMDEPS) .
|
|
||||||
$(COPY) $(DSYSTEMDEPS2) .
|
|
||||||
$(COPY) $(DSYSPROCDEPS) .
|
|
||||||
$(PP) $(OPT) -Us -Sg syslinux.pp $(REDIR)
|
$(PP) $(OPT) -Us -Sg syslinux.pp $(REDIR)
|
||||||
$(DEL) $(SYSTEMDEPS)
|
|
||||||
$(DEL) $(SYSTEMDEPS2)
|
|
||||||
$(DEL) $(SYSPROCDEPS)
|
|
||||||
|
|
||||||
strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
|
strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
|
||||||
$(COPY) $(PROCINC)/strings.pp .
|
$(COPY) $(PROCINC)/strings.pp .
|
||||||
@ -307,9 +227,7 @@ strings$(PPUEXT) : $(PROCINC)/strings.pp $(SYSTEMPPU)
|
|||||||
|
|
||||||
linux$(PPUEXT) : linux.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
linux$(PPUEXT) : linux.pp strings$(PPUEXT) $(INC)/textrec.inc $(INC)/filerec.inc \
|
||||||
syscalls.inc systypes.inc sysconst.inc $(SYSTEMPPU)
|
syscalls.inc systypes.inc sysconst.inc $(SYSTEMPPU)
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) linux.pp $(REDIR)
|
$(PP) $(OPT) linux.pp $(REDIR)
|
||||||
$(DEL) filerec.inc textrec.inc
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Delphi Object Model
|
# Delphi Object Model
|
||||||
@ -326,9 +244,7 @@ objpas$(PPUEXT) : $(OBJPASDIR)/objpas.pp $(SYSTEMPPU)
|
|||||||
|
|
||||||
sockets$(PPUEXT) : sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
|
sockets$(PPUEXT) : sockets.pp $(INC)/textrec.inc $(INC)/filerec.inc \
|
||||||
linux$(PPUEXT) $(SYSTEMPPU)
|
linux$(PPUEXT) $(SYSTEMPPU)
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) sockets.pp $(REDIR)
|
$(PP) $(OPT) sockets.pp $(REDIR)
|
||||||
$(DEL) filerec.inc textrec.inc
|
|
||||||
|
|
||||||
errors$(PPUEXT) : errors.pp strings$(PPUEXT) $(SYSTEMPPU)
|
errors$(PPUEXT) : errors.pp strings$(PPUEXT) $(SYSTEMPPU)
|
||||||
$(PP) $(OPT) errors.pp $(REDIR)
|
$(PP) $(OPT) errors.pp $(REDIR)
|
||||||
@ -338,23 +254,17 @@ errors$(PPUEXT) : errors.pp strings$(PPUEXT) $(SYSTEMPPU)
|
|||||||
#
|
#
|
||||||
|
|
||||||
dos$(PPUEXT) : $(DOSDEPS) $(SYSTEMPPU)
|
dos$(PPUEXT) : $(DOSDEPS) $(SYSTEMPPU)
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) dos $(REDIR)
|
$(PP) $(OPT) dos $(REDIR)
|
||||||
$(DEL) filerec.inc textrec.inc
|
|
||||||
|
|
||||||
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(INC)/filerec.inc linux$(PPUEXT)\
|
crt$(PPUEXT) : crt.pp $(INC)/textrec.inc $(INC)/filerec.inc linux$(PPUEXT)\
|
||||||
$(SYSTEMPPU)
|
$(SYSTEMPPU)
|
||||||
$(COPY) $(INC)/filerec.inc $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) crt $(REDIR)
|
$(PP) $(OPT) crt $(REDIR)
|
||||||
$(DEL) filerec.inc textrec.inc
|
|
||||||
|
|
||||||
objects$(PPUEXT) : objects.pp $(SYSTEMPPU)
|
objects$(PPUEXT) : objects.pp $(SYSTEMPPU)
|
||||||
$(PP) $(OPT) objects $(REDIR)
|
$(PP) $(OPT) objects $(REDIR)
|
||||||
|
|
||||||
printer$(PPUEXT) : printer.pp $(INC)/textrec.inc linux$(PPUEXT) $(SYSTEMPPU)
|
printer$(PPUEXT) : printer.pp $(INC)/textrec.inc linux$(PPUEXT) $(SYSTEMPPU)
|
||||||
$(COPY) $(INC)/textrec.inc .
|
|
||||||
$(PP) $(OPT) printer $(REDIR)
|
$(PP) $(OPT) printer $(REDIR)
|
||||||
$(DEL) textrec.inc
|
|
||||||
|
|
||||||
graph$(PPUEXT) : graph.pp linux$(PPUEXT) objects$(PPUEXT)
|
graph$(PPUEXT) : graph.pp linux$(PPUEXT) objects$(PPUEXT)
|
||||||
$(PP) $(OPT) graph $(REDIR)
|
$(PP) $(OPT) graph $(REDIR)
|
||||||
|
7
rtl/m68k/makefile.cpu
Normal file
7
rtl/m68k/makefile.cpu
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#
|
||||||
|
# Here we set processor dependent include file names.
|
||||||
|
#
|
||||||
|
|
||||||
|
CPUNAMES=m68k heap lowmath math set
|
||||||
|
CPUINCNAMES=$(addsuffix .inc,$(CPUNAMES))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user