mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 09:47:56 +02:00

* Replace dynlibs by DYNLIBSUNIT variable use everywhere * Remove OS specific dynlibs unit rules * Set DYNLIBSINCDIR varaible where required * Set DYNLIBS_DEPS_OS where needed
189 lines
4.7 KiB
Makefile
189 lines
4.7 KiB
Makefile
#
|
|
# Makefile.fpc for Free Pascal Netware RTL (Libc)
|
|
#
|
|
|
|
[package]
|
|
main=rtl
|
|
|
|
[target]
|
|
loaders=nwplibc nwl_main nwl_dlle
|
|
units=$(SYSTEMUNIT) $(UUCHARUNIT) $(OBJPASUNIT) $(MACPASUNIT) $(ISO7185UNIT) $(EXTPASUNIT) $(STRINGSUNIT) \
|
|
$(LINEINFOUNIT) $(LNFODWRFUNIT) $(HEAPTRCUNIT) \
|
|
nwsnut libc dos sysconst \
|
|
initc sysutils types typinfo $(SORTBASEUNIT) $(FGLUNIT) classes \
|
|
cpu $(MMXUNIT) $(GETOPTSUNIT) \
|
|
$(CHARSETUNIT) $(CPALLUNIT) \
|
|
rtlconsts $(MATHUNIT) \
|
|
$(DYNLIBSUNIT) $(CMEMUNIT) ctypes \
|
|
$(SOFTFPUUNIT) $(SFPUX80UNIT) $(UFLOATX80UNIT) $(SFPU128UNIT) $(UFLOAT128UNIT)
|
|
|
|
rsts=$(MATHUNIT) typinfo classes sysconst rtlconsts system
|
|
implicitunits=$(EXEINFOUNIT) $(CP_UNITS)
|
|
|
|
[require]
|
|
nortl=y
|
|
|
|
[install]
|
|
fpcpackage=y
|
|
|
|
[default]
|
|
target=netwlibc
|
|
|
|
[compiler]
|
|
includedir=$(INC) $(PROCINC)
|
|
sourcedir=$(INC) $(PROCINC) $(COMMON)
|
|
|
|
|
|
[prerules]
|
|
RTL=..
|
|
INC=$(RTL)/inc
|
|
COMMON=$(RTL)/common
|
|
PROCINC=$(RTL)/$(CPU_TARGET)
|
|
|
|
UNITPREFIX=rtl
|
|
|
|
IMPFILES=nwsnut.imp ws2_32.imp ws2nlm.imp libc.imp netware.imp \
|
|
libcclib.imp
|
|
# nwplibc.o
|
|
|
|
SYSTEMUNIT=system
|
|
|
|
# Use new feature from 1.0.5 version
|
|
# that generates release PPU files
|
|
# which will not be recompiled
|
|
# ifdef RELEASE
|
|
override FPCOPT+=-Ur
|
|
# endif
|
|
|
|
#debug, -a: dont delete asm, -al include lines
|
|
#override FPCOPT+=-a
|
|
#override FPCOPT+=-al
|
|
|
|
|
|
# for netware always use multithread
|
|
override FPCOPT+=-dMT
|
|
|
|
# and alway use smartlinking
|
|
CREATESMART=1
|
|
|
|
# Paths
|
|
OBJPASDIR=$(RTL)/objpas
|
|
|
|
# binutils are the same for targets netware and netwlibc
|
|
override BINUTILSPREFIX=$(CPU_TARGET)-netware-
|
|
|
|
[rules]
|
|
.NOTPARALLEL:
|
|
SYSTEMPPU=$(addsuffix $(PPUEXT),$(SYSTEMUNIT))
|
|
|
|
# Get the system independent include file names.
|
|
# This will set the following variables :
|
|
# SYSINCNAMES
|
|
include $(INC)/makefile.inc
|
|
SYSINCDEPS=$(addprefix $(INC)/,$(SYSINCNAMES))
|
|
|
|
# Get the processor dependent include file names.
|
|
# This will set the following variables :
|
|
# CPUINCNAMES
|
|
include $(PROCINC)/makefile.cpu
|
|
SYSCPUDEPS=$(addprefix $(PROCINC)/,$(CPUINCNAMES))
|
|
|
|
# Put system unit dependencies together.
|
|
SYSDEPS=$(SYSINCDEPS) $(SYSCPUDEPS)
|
|
|
|
copyimpfiles:
|
|
$(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
|
|
|
|
#
|
|
# Loaders
|
|
#
|
|
|
|
#nwpre$(OEXT) : nwpre.as
|
|
# $(AS) -o nwpre$(OEXT) nwpre.as
|
|
|
|
#prelude$(OEXT) : prelude.as
|
|
# $(AS) -o prelude$(OEXT) prelude.as
|
|
|
|
# for now use the gcc pre
|
|
nwplibc$(OEXT) :
|
|
cp pre/libcpre.gcc.o $(UNITTARGETDIRPREFIX)nwplibc$(OEXT)
|
|
|
|
nwl_main$(OEXT) : nwl_main.as
|
|
$(AS) -o $(UNITTARGETDIRPREFIX)nwl_main$(OEXT) nwl_main.as
|
|
|
|
nwl_dlle$(OEXT) : nwl_dlle.as
|
|
$(AS) -o $(UNITTARGETDIRPREFIX)nwl_dlle$(OEXT) nwl_dlle.as
|
|
|
|
#
|
|
# System Units (System, Objpas, Strings)
|
|
#
|
|
|
|
$(SYSTEMUNIT)$(PPUEXT) : $(SYSTEMUNIT).pp libc.pp $(SYSDEPS)
|
|
$(COPY) $(IMPFILES) $(COMPILER_UNITTARGETDIR)
|
|
$(COMPILER) $(FPC_SYSTEM_OPT) -Us -Sg $(SYSTEMUNIT).pp
|
|
|
|
#
|
|
# System Dependent Units
|
|
#
|
|
|
|
netware$(PPUEXT) : netware.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) -I$(WININC) netware.pp
|
|
|
|
nwsnut$(PPUEXT) : nwsnut.pp ../netware/nwsnut.pp libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
initc$(PPUEXT) : initc.pp ctypes$(PPUEXT) libc$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
|
|
#
|
|
# TP7 Compatible RTL Units
|
|
#
|
|
|
|
dos$(PPUEXT) : dos.pp libc.pp $(INC)/filerec.inc $(INC)/textrec.inc strings$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# Delphi Compatible Units
|
|
#
|
|
|
|
sysutils$(PPUEXT) : sysutils.pp $(wildcard $(OBJPASDIR)/sysutils/*.inc) \
|
|
$(OBJPASUNIT)$(PPUEXT) dos$(PPUEXT) libc.pp sysconst$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
|
|
|
|
classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
|
|
sysutils$(PPUEXT) typinfo$(PPUEXT) rtlconsts$(PPUEXT) \
|
|
sysconst$(PPUEXT) types$(PPUEXT) sortbase$(PPUEXT) \
|
|
tthread.inc $(FGLUNIT)$(PPUEXT)
|
|
$(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
|
|
|
|
typinfo$(PPUEXT): $(OBJPASDIR)/typinfo.pp $(OBJPASUNIT)$(PPUEXT)
|
|
$(COMPILER) -Sg $(OBJPASDIR)/typinfo.pp
|
|
|
|
types$(PPUEXT) : $(OBJPASDIR)/types.pp $(OBJPASUNIT)$(PPUEXT) $(MATHUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/types.pp
|
|
|
|
rtlconsts$(PPUEXT) : $(OBJPASDIR)/rtlconsts.pp $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/rtlconsts.pp
|
|
|
|
sysconst$(PPUEXT) : $(OBJPASDIR)/sysconst.pp $(OBJPASUNIT)$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
|
$(COMPILER) $(OBJPASDIR)/sysconst.pp
|
|
|
|
#
|
|
# Other system-independent RTL Units
|
|
#
|
|
|
|
cpu$(PPUEXT) : $(PROCINC)/cpu.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
ctypes$(PPUEXT) : $(INC)/ctypes.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# Other system-dependent RTL Units
|
|
#
|
|
|
|
aio$(PPUEXT) : aio.pp $(SYSTEMUNIT)$(PPUEXT)
|
|
|
|
#
|
|
# Netware-.imp files need to be installed in the unit-dir
|
|
#
|
|
override INSTALLPPUFILES+=$(IMPFILES)
|
|
override CLEANPPUFILES+=$(addprefix $(COMPILER_UNITTARGETDIR)/,$(IMPFILES))
|
|
|