mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-02 22:49:34 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			172 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			172 lines
		
	
	
		
			4.1 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 $(SYSCONSTUNIT) \
 | 
						|
      $(INITCUNIT) sysutils $(TYPESUNIT) $(TYPINFOUNIT) $(SORTBASEUNIT) $(FGLUNIT) classes \
 | 
						|
      cpu $(MMXUNIT) $(GETOPTSUNIT) \
 | 
						|
      $(CHARSETUNIT) $(CPALLUNIT) \
 | 
						|
      $(RTLCONSTSUNIT) $(MATHUNIT) \
 | 
						|
      $(DYNLIBSUNIT) $(CMEMUNIT) $(CTYPESUNIT) \
 | 
						|
      $(SOFTFPUUNIT) $(SFPUX80UNIT) $(UFLOATX80UNIT) $(SFPU128UNIT) $(UFLOAT128UNIT)
 | 
						|
 | 
						|
rsts=$(MATHUNIT) $(TYPINFOUNIT) classes $(SYSCONSTUNIT) $(RTLCONSTSUNIT) 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)
 | 
						|
 | 
						|
#
 | 
						|
# 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 $(SYSCONSTUNIT)$(PPUEXT)
 | 
						|
        $(COMPILER) -Fi$(OBJPASDIR)/sysutils sysutils.pp
 | 
						|
 | 
						|
classes$(PPUEXT) : classes.pp $(wildcard $(OBJPASDIR)/classes/*.inc) \
 | 
						|
                   sysutils$(PPUEXT) $(TYPINFOUNIT)$(PPUEXT) $(RTLCONSTSUNIT)$(PPUEXT) \
 | 
						|
                   $(SYSCONSTUNIT)$(PPUEXT) $(TYPESUNIT)$(PPUEXT) sortbase$(PPUEXT) \
 | 
						|
                   tthread.inc $(FGLUNIT)$(PPUEXT)
 | 
						|
        $(COMPILER) -Fi$(OBJPASDIR)/classes classes.pp
 | 
						|
 | 
						|
#
 | 
						|
# Other system-independent RTL Units
 | 
						|
#
 | 
						|
 | 
						|
cpu$(PPUEXT) : $(PROCINC)/cpu.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))
 | 
						|
 |