Browse Source

* fpcmake update

peter 26 years ago
parent
commit
56343f0b08
1 changed files with 143 additions and 144 deletions
  1. 143 144
      rtl/linux/Makefile

+ 143 - 144
rtl/linux/Makefile

@@ -1,5 +1,5 @@
 #
-# Makefile generated by fpcmake v0.99.13 on 1999-11-11 00:12
+# Makefile generated by fpcmake v0.99.13 on 1999-11-23 09:32
 #
 
 defaultrule: all
@@ -167,11 +167,17 @@ DEFAULTUNITS=1
 ifndef FPCDIR
 FPCDIR=.
 endif
+ifndef PACKAGEDIR
+PACKAGEDIR=$(FPCDIR)/packages
+endif
 override NEEDINCDIR=$(INC) $(PROCINC)
 ifndef TARGETDIR
 TARGETDIR=.
 endif
 
+# Packages
+
+
 # Libraries
 
 LIBNAME=fprtl
@@ -211,6 +217,11 @@ else
 BASEDIR=.
 endif
 
+# this can be set to 'rtl' when the RTL units are installed
+ifndef UNITPREFIX
+UNITPREFIX=units
+endif
+
 # set the prefix directory where to install everything
 ifndef PREFIXINSTALLDIR
 ifdef inlinux
@@ -220,43 +231,8 @@ export PREFIXINSTALLDIR=/pp
 endif
 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
-ifeq ($(strip $(wildcard $(UNITDIR)/*)),)
-UNITDIR=
-endif
-
-# On linux, try to find where libgcc.a is.
-ifdef inlinux
-ifndef GCCLIBDIR
-export GCCLIBDIR:=$(shell dirname `(gcc -v 2>&1)| head -n 1| awk '{ print $$4 } '`)
-endif
-endif
-
-# Where to find other libraries
-ifdef inlinux
-ifndef OTHERLIBDIR
-export OTHERLIBDIR:=$(shell grep -v "^\#" /etc/ld.so.conf | awk '{ ORS=" "; print $1 }')
-endif
-endif
-
 #####################################################################
-# Install Directories based on BASEINSTALLDIR
+# Install Directories
 #####################################################################
 
 # set the base directory where to install everything
@@ -268,16 +244,6 @@ BASEINSTALLDIR=$(PREFIXINSTALLDIR)
 endif
 endif
 
-
-# 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
@@ -287,15 +253,28 @@ BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
 endif
 endif
 
-# Where the .msg files will be stored
-ifndef MSGINSTALLDIR
-MSGINSTALLDIR=$(BASEINSTALLDIR)/msg
+# set the directory where to install the units.
+ifndef UNITINSTALLDIR
+UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
 endif
 
-# Where the .msg files will be stored
+# Where to install shared libraries
+ifndef LIBINSTALLDIR
+ifdef inlinux
+LIBINSTALLDIR=$(PREFIXINSTALLDIR)/lib
+else
+LIBINSTALLDIR=$(UNITINSTALLDIR)
+endif
+endif
+
+# Where the source files will be stored
 ifndef SOURCEINSTALLDIR
+ifdef inlinux
+SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
+else
 SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
 endif
+endif
 
 # Where the doc files will be stored
 ifndef DOCINSTALLDIR
@@ -306,42 +285,9 @@ DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
 endif
 endif
 
-########################
-# Unit Directories
-########################
-
-# this can be set to 'rtl' when the RTL units are installed
-ifndef UNITPREFIX
-UNITPREFIX=units
-endif
-
-# set the directory where to install the units.
-ifndef UNITINSTALLDIR
-UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
-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
+# Where the some extra (data)files will be stored
+ifndef EXTRAINSTALLDIR
+EXTRAINSTALLDIR=$(BASEINSTALLDIR)
 endif
 
 
@@ -381,8 +327,8 @@ override FPCOPT+=-FE$(TARGETDIR)
 endif
 
 # Smartlinking
-ifeq ($(SMARTLINK),YES)
-override FPCOPT+=-Cx
+ifdef SMARTLINK
+override FPCOPT+=-CX
 endif
 
 # Add commandline options
@@ -479,16 +425,6 @@ ifndef LD
 LD=ld
 endif
 
-# Where is the ppumove program ?
-ifndef PPUMOVE
-PPUMOVE=ppumove
-endif
-
-# Where is the ppdep program ?
-ifndef PPDEP
-PPDEP=ppdep
-endif
-
 # ppas.bat / ppas.sh
 ifdef inlinux
 PPAS=ppas.sh
@@ -524,6 +460,36 @@ export ECHO:=$(firstword $(ECHO))
 endif
 endif
 
+# ppdep
+ifndef PPDEP
+PPDEP:=$(strip $(wildcard $(addsuffix /ppdep$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPDEP),)
+PPDEP=
+else
+export PPDEP:=$(firstword $(PPDEP))
+endif
+endif
+
+# ppumove
+ifndef PPUMOVE
+PPUMOVE:=$(strip $(wildcard $(addsuffix /ppumove$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUMOVE),)
+PPUMOVE=
+else
+export PPUMOVE:=$(firstword $(PPUMOVE))
+endif
+endif
+
+# ppufiles
+ifndef PPUFILES
+PPUFILES:=$(strip $(wildcard $(addsuffix /ppufiles$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PPUFILES),)
+PPUFILES=
+else
+export PPUFILES:=$(firstword $(PPUFILES))
+endif
+endif
+
 # Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
 # upx uses that one itself (PFV)
 ifndef UPXPROG
@@ -665,33 +631,27 @@ endif
 # Default rules
 #####################################################################
 
-.PHONY: defaultrule all staticlib sharedlib showinstall install \
-	staticinstall sharedinstall libinstall zipinstall zipinstalladd \
+.PHONY: defaultrule all smart shared \
+	showinstall install zipinstall zipinstalladd \
 	clean cleanall depend info
 
 all: fpc_all
 
-staticlib: fpc_staticlib
+smart: fpc_smart
 
-sharedlib: fpc_sharedlib
+shared: fpc_shared
 
 showinstall: fpc_showinstall
 
 install: fpc_install
 
-staticinstall: fpc_staticinstall
-
-sharedinstall: fpc_sharedinstall
-
-libinstall: fpc_libinstall
-
 zipinstall: fpc_zipinstall
 
 zipinstalladd: fpc_zipinstalladd
 
 clean: fpc_clean
 
-clean_all: fpc_clean_all
+cleanall: fpc_cleanall
 
 depend: fpc_depend
 
@@ -704,12 +664,16 @@ info: fpc_info
 .PHONY: fpc_all fpc_units fpc_exes fpc_loaders
 
 # Create Filenames
+ifdef LOADEROBJECTS
 LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
+endif
+ifdef EXEOBJECTS
 EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
 EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
+endif
+ifdef UNITOBJECTS
 UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
-UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS))
-UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
+endif
 
 .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
 
@@ -749,18 +713,17 @@ fpc_exes: $(EXEFILES)
 # Library
 #####################################################################
 
-.PHONY: fpc_staticlib fpc_sharedlib
+.PHONY: fpc_smart fpc_shared
 
 # Default sharedlib units are all unit objects
 ifndef SHAREDLIBUNITOBJECTS
 SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
 endif
 
-fpc_staticlib:
-	$(MAKE) libsclean
-	$(MAKE) all SMARTLINK=YES
+fpc_smart:
+	$(MAKE) all SMARTLINK=1
 
-fpc_sharedlib: all
+fpc_shared: all
 ifdef inlinux
 ifndef LIBNAME
 	@$(ECHO) LIBNAME not set
@@ -775,16 +738,27 @@ endif
 # Install rules
 #####################################################################
 
-.PHONY: fpc_showinstallfiles fpc_install
+.PHONY: fpc_showinstall fpc_install
 
-ifdef UNITOBJECTS
-override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+ifdef UNITPPUFILES
+override INSTALLPPUFILES:=$(UNITPPUFILES)
 endif
 ifdef EXTRAINSTALLUNITS
-override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS)))
+override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
 endif
 
-fpc_showinstallfiles : all
+ifdef INSTALLPPUFILES
+ifdef PPUFILES
+ifdef inlinux
+INSTALLPPULINKFILES=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
+INSTALLPPULIBFILES=$(shell $(PPUFILES) -L $(INSTALLPPUFILES))
+else
+INSTALLPPULINKFILES=$(shell $(PPUFILES) $(INSTALLPPUFILES))
+endif
+endif
+endif
+
+fpc_showinstall:
 ifndef DEFAULTUNITS
 ifdef EXEOBJECTS
 	@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
@@ -793,11 +767,17 @@ endif
 ifdef LOADEROBJECTS
 	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
 endif
-ifdef UNITINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES))
+ifdef INSTALLPPUFILES
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
+ifneq ($(INSTALLPPULINKFILES),)
+	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
+endif
 endif
 ifdef EXTRAINSTALLFILES
-	@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES))
+	@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
 endif
 
 fpc_install:
@@ -816,13 +796,20 @@ ifdef LOADEROBJECTS
 	$(MKDIR) $(UNITINSTALLDIR)
 	$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
 endif
-ifdef UNITINSTALLFILES
+ifdef INSTALLPPUFILES
 	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR)
+	$(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
+ifneq ($(INSTALLPPULINKFILES),)
+	$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
+endif
+ifneq ($(INSTALLPPULIBFILES),)
+	$(MKDIR) $(LIBINSTALLDIR)
+	$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
+endif
 endif
 ifdef EXTRAINSTALLFILES
-	$(MKDIR) $(UNITINSTALLDIR)
-	$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR)
+	$(MKDIR) $(EXTRAINSTALLDIR)
+	$(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
 endif
 
 #####################################################################
@@ -894,13 +881,13 @@ endif
 # Clean rules
 #####################################################################
 
-.PHONY: fpc_clean fpc_libsclean fpc_cleanall
+.PHONY: fpc_clean fpc_cleanall
 
-ifdef UNITOBJECTS
-override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES))
+ifdef UNITPPUFILES
+override CLEANPPUFILES=$(UNITPPUFILES)
 endif
 ifdef EXTRACLEANUNITS
-override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS)))
+override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
 endif
 
 fpc_clean:
@@ -910,23 +897,24 @@ endif
 ifdef LOADEROBJECTS
 	-$(DEL) $(LOADEROFILES)
 endif
-ifdef UNITCLEANFILES
-	-$(DEL) $(UNITCLEANFILES)
+ifdef CLEANPPUFILES
+	-$(DEL) $(CLEANPPUFILES)
+ifdef PPUFILES
+	-$(DEL) $(shell $(PPUFILES) $(CLEANPPUFILES))
+endif
 endif
 ifdef EXTRACLEANFILES
 	-$(DEL) $(EXTRACLEANFILES)
 endif
 	-$(DEL) $(PPAS) link.res log
 
-fpc_libsclean: clean
-	-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-
 fpc_cleanall:
 ifdef EXEOBJECTS
 	-$(DEL) $(EXEFILES)
 endif
 	-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
 	-$(DELTREE) *$(SMARTEXT)
+	-$(DEL) $(PPAS) link.res log
 
 #####################################################################
 # Depend rules
@@ -957,6 +945,20 @@ fpc_infocfg:
 	@$(ECHO)  Target.... $(OS_TARGET)
 	@$(ECHO)
 
+fpc_infoobjects:
+	@$(ECHO)
+	@$(ECHO)  == Object info ==
+	@$(ECHO)
+	@$(ECHO)  LoaderObjects..... $(LOADEROBJECTS)
+	@$(ECHO)  UnitObjects....... $(UNITOBJECTS)
+	@$(ECHO)  ExeObjects........ $(EXEOBJECTS)
+	@$(ECHO)
+	@$(ECHO)  ExtraCleanUnits... $(EXTRACLEANUNITS)
+	@$(ECHO)  ExtraCleanFiles... $(EXTRACLEANFILES)
+	@$(ECHO)
+	@$(ECHO)  ExtraInstallUnits. $(EXTRAINSTALLUNITS)
+	@$(ECHO)  ExtraInstallFiles. $(EXTRAINSTALLFILES)
+	@$(ECHO)
 
 fpc_infoinstall:
 	@$(ECHO)
@@ -969,14 +971,11 @@ endif
 	@$(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)  UnitInstallDir....... $(UNITINSTALLDIR)
+	@$(ECHO)  SourceInstallDir..... $(SOURCEINSTALLDIR)
 	@$(ECHO)  DocInstallDir........ $(DOCINSTALLDIR)
+	@$(ECHO)  ExtraInstallDir...... $(EXTRAINSTALLDIR)
 	@$(ECHO)
 
 #####################################################################