* new fpcmake

This commit is contained in:
peter 1999-11-23 09:45:02 +00:00
parent 02e2694f8e
commit 828f946f81

View File

@ -1,5 +1,5 @@
# #
# Makefile generated by fpcmake v0.99.13 on 1999-11-10 23:53 # Makefile generated by fpcmake v0.99.13 on 1999-11-22 18:25
# #
defaultrule: all defaultrule: all
@ -136,6 +136,12 @@ override NEEDOPT=-Sg
ifndef FPCDIR ifndef FPCDIR
FPCDIR=../.. FPCDIR=../..
endif endif
ifndef PACKAGEDIR
PACKAGEDIR=$(FPCDIR)/packages
endif
# Packages
# Libraries # Libraries
@ -155,6 +161,11 @@ else
BASEDIR=. BASEDIR=.
endif 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 # set the prefix directory where to install everything
ifndef PREFIXINSTALLDIR ifndef PREFIXINSTALLDIR
ifdef inlinux ifdef inlinux
@ -164,43 +175,8 @@ export PREFIXINSTALLDIR=/pp
endif endif
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 # set the base directory where to install everything
@ -212,16 +188,6 @@ BASEINSTALLDIR=$(PREFIXINSTALLDIR)
endif endif
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 # set the directory where to install the binaries
ifndef BININSTALLDIR ifndef BININSTALLDIR
ifdef inlinux ifdef inlinux
@ -231,15 +197,28 @@ BININSTALLDIR=$(BASEINSTALLDIR)/bin/$(OS_TARGET)
endif endif
endif endif
# Where the .msg files will be stored # set the directory where to install the units.
ifndef MSGINSTALLDIR ifndef UNITINSTALLDIR
MSGINSTALLDIR=$(BASEINSTALLDIR)/msg UNITINSTALLDIR=$(BASEINSTALLDIR)/$(UNITPREFIX)/$(OS_TARGET)
endif 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 ifndef SOURCEINSTALLDIR
ifdef inlinux
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
else
SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
endif endif
endif
# Where the doc files will be stored # Where the doc files will be stored
ifndef DOCINSTALLDIR ifndef DOCINSTALLDIR
@ -250,42 +229,9 @@ DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
endif endif
endif endif
######################## # Where the some extra (data)files will be stored
# Unit Directories ifndef EXTRAINSTALLDIR
######################## EXTRAINSTALLDIR=$(BASEINSTALLDIR)
# 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
endif endif
@ -315,8 +261,8 @@ endif
endif endif
# Smartlinking # Smartlinking
ifeq ($(SMARTLINK),YES) ifdef SMARTLINK
override FPCOPT+=-Cx override FPCOPT+=-CX
endif endif
# Add commandline options # Add commandline options
@ -413,16 +359,6 @@ ifndef LD
LD=ld LD=ld
endif 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 # ppas.bat / ppas.sh
ifdef inlinux ifdef inlinux
PPAS=ppas.sh PPAS=ppas.sh
@ -458,6 +394,36 @@ export ECHO:=$(firstword $(ECHO))
endif endif
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 # Look if UPX is found for go32v2 and win32. We can't use $UPX becuase
# upx uses that one itself (PFV) # upx uses that one itself (PFV)
ifndef UPXPROG ifndef UPXPROG
@ -599,26 +565,20 @@ endif
# Default rules # Default rules
##################################################################### #####################################################################
.PHONY: defaultrule all staticlib sharedlib showinstall install \ .PHONY: defaultrule all smart shared \
staticinstall sharedinstall libinstall zipinstall zipinstalladd \ showinstall install zipinstall zipinstalladd \
clean cleanall depend info clean cleanall depend info
all: fpc_all all: fpc_all
staticlib: fpc_staticlib smart: fpc_smart
sharedlib: fpc_sharedlib shared: fpc_shared
showinstall: fpc_showinstall showinstall: fpc_showinstall
install: fpc_install install: fpc_install
staticinstall: fpc_staticinstall
sharedinstall: fpc_sharedinstall
libinstall: fpc_libinstall
zipinstall: fpc_zipinstall zipinstall: fpc_zipinstall
zipinstalladd: fpc_zipinstalladd zipinstalladd: fpc_zipinstalladd
@ -638,12 +598,16 @@ info: fpc_info
.PHONY: fpc_all fpc_units fpc_exes fpc_loaders .PHONY: fpc_all fpc_units fpc_exes fpc_loaders
# Create Filenames # Create Filenames
ifdef LOADEROBJECTS
LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS)) LOADEROFILES=$(addsuffix $(OEXT),$(LOADEROBJECTS))
endif
ifdef EXEOBJECTS
EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS)) EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS)) EXEOFILES=$(addsuffix $(OEXT),$(EXEOBJECTS))
endif
ifdef UNITOBJECTS
UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS)) UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
UNITOFILES=$(addsuffix $(OEXT),$(UNITOBJECTS)) endif
UNITAFILES=$(addsuffix $(STATICLIBEXT),$(UNITOBJECTS))
.SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp .SUFFIXES: $(EXEEXT) $(PPUEXT) $(OEXT) .pas .pp
@ -683,18 +647,17 @@ fpc_exes: $(EXEFILES)
# Library # Library
##################################################################### #####################################################################
.PHONY: fpc_staticlib fpc_sharedlib .PHONY: fpc_smart fpc_shared
# Default sharedlib units are all unit objects # Default sharedlib units are all unit objects
ifndef SHAREDLIBUNITOBJECTS ifndef SHAREDLIBUNITOBJECTS
SHAREDLIBUNITOBJECTS=$(UNITOBJECTS) SHAREDLIBUNITOBJECTS=$(UNITOBJECTS)
endif endif
fpc_staticlib: fpc_smart:
$(MAKE) libsclean $(MAKE) all SMARTLINK=1
$(MAKE) all SMARTLINK=YES
fpc_sharedlib: all fpc_shared: all
ifdef inlinux ifdef inlinux
ifndef LIBNAME ifndef LIBNAME
@$(ECHO) LIBNAME not set @$(ECHO) LIBNAME not set
@ -709,16 +672,27 @@ endif
# Install rules # Install rules
##################################################################### #####################################################################
.PHONY: fpc_showinstallfiles fpc_install .PHONY: fpc_showinstall fpc_install
ifdef UNITOBJECTS ifdef UNITPPUFILES
override UNITINSTALLFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES)) override INSTALLPPUFILES:=$(UNITPPUFILES)
endif endif
ifdef EXTRAINSTALLUNITS ifdef EXTRAINSTALLUNITS
override EXTRAINSTALLFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRAINSTALLUNITS)) $(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))) override INSTALLPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRAINSTALLUNITS))
endif 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 ifndef DEFAULTUNITS
ifdef EXEOBJECTS ifdef EXEOBJECTS
@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES)) @$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(EXEFILES))
@ -727,11 +701,17 @@ endif
ifdef LOADEROBJECTS ifdef LOADEROBJECTS
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES)) @$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(LOADEROFILES))
endif endif
ifdef UNITINSTALLFILES ifdef INSTALLPPUFILES
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(UNITINSTALLFILES)) @$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
ifneq ($(INSTALLPPULINKFILES),)
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
endif
ifneq ($(INSTALLPPULIBFILES),)
@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
endif
endif endif
ifdef EXTRAINSTALLFILES ifdef EXTRAINSTALLFILES
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(EXTRAINSTALLFILES)) @$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
endif endif
fpc_install: fpc_install:
@ -750,13 +730,20 @@ ifdef LOADEROBJECTS
$(MKDIR) $(UNITINSTALLDIR) $(MKDIR) $(UNITINSTALLDIR)
$(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR) $(INSTALL) $(LOADEROFILES) $(UNITINSTALLDIR)
endif endif
ifdef UNITINSTALLFILES ifdef INSTALLPPUFILES
$(MKDIR) $(UNITINSTALLDIR) $(MKDIR) $(UNITINSTALLDIR)
$(INSTALL) $(UNITINSTALLFILES) $(UNITINSTALLDIR) $(INSTALL) $(INSTALLPPUFILES) $(UNITINSTALLDIR)
ifneq ($(INSTALLPPULINKFILES),)
$(INSTALL) $(INSTALLPPULINKFILES) $(UNITINSTALLDIR)
endif
ifneq ($(INSTALLPPULIBFILES),)
$(MKDIR) $(LIBINSTALLDIR)
$(INSTALL) $(INSTALLPPULIBFILES) $(LIBINSTALLDIR)
endif
endif endif
ifdef EXTRAINSTALLFILES ifdef EXTRAINSTALLFILES
$(MKDIR) $(UNITINSTALLDIR) $(MKDIR) $(EXTRAINSTALLDIR)
$(INSTALL) $(EXTRAINSTALLFILES) $(UNITINSTALLDIR) $(INSTALL) $(EXTRAINSTALLFILES) $(EXTRAINSTALLDIR)
endif endif
##################################################################### #####################################################################
@ -828,13 +815,13 @@ endif
# Clean rules # Clean rules
##################################################################### #####################################################################
.PHONY: fpc_clean fpc_libsclean fpc_cleanall .PHONY: fpc_clean fpc_cleanall
ifdef UNITOBJECTS ifdef UNITPPUFILES
override UNITCLEANFILES=$(wildcard $(UNITPPUFILES) $(UNITOFILES) $(UNITAFILES)) override CLEANPPUFILES=$(UNITPPUFILES)
endif endif
ifdef EXTRACLEANUNITS ifdef EXTRACLEANUNITS
override EXTRACLEANFILES+=$(wildcard $(addsuffix $(OEXT),$(EXTRACLEANUNITS)) $(addsuffix $(STATICLIBEXT),$(EXTRACLEANUNITS)) $(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))) override CLEANPPUFILES+=$(addsuffix $(PPUEXT),$(EXTRACLEANUNITS))
endif endif
fpc_clean: fpc_clean:
@ -844,23 +831,24 @@ endif
ifdef LOADEROBJECTS ifdef LOADEROBJECTS
-$(DEL) $(LOADEROFILES) -$(DEL) $(LOADEROFILES)
endif endif
ifdef UNITCLEANFILES ifdef CLEANPPUFILES
-$(DEL) $(UNITCLEANFILES) -$(DEL) $(CLEANPPUFILES)
ifdef PPUFILES
-$(DEL) $(shell $(PPUFILES) $(CLEANPPUFILES))
endif
endif endif
ifdef EXTRACLEANFILES ifdef EXTRACLEANFILES
-$(DEL) $(EXTRACLEANFILES) -$(DEL) $(EXTRACLEANFILES)
endif endif
-$(DEL) $(PPAS) link.res log -$(DEL) $(PPAS) link.res log
fpc_libsclean: clean
-$(DEL) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
fpc_cleanall: fpc_cleanall:
ifdef EXEOBJECTS ifdef EXEOBJECTS
-$(DEL) $(EXEFILES) -$(DEL) $(EXEFILES)
endif endif
-$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT) -$(DEL) *$(OEXT) *$(PPUEXT) *$(ASMEXT) *$(STATICLIBEXT) *$(SHAREDLIBEXT) *$(PPLEXT)
-$(DELTREE) *$(SMARTEXT) -$(DELTREE) *$(SMARTEXT)
-$(DEL) $(PPAS) link.res log
##################################################################### #####################################################################
# Depend rules # Depend rules
@ -891,6 +879,20 @@ fpc_infocfg:
@$(ECHO) Target.... $(OS_TARGET) @$(ECHO) Target.... $(OS_TARGET)
@$(ECHO) @$(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: fpc_infoinstall:
@$(ECHO) @$(ECHO)
@ -903,14 +905,11 @@ endif
@$(ECHO) @$(ECHO)
@$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR) @$(ECHO) BaseInstallDir....... $(BASEINSTALLDIR)
@$(ECHO) BinInstallDir........ $(BININSTALLDIR) @$(ECHO) BinInstallDir........ $(BININSTALLDIR)
@$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
@$(ECHO) StaticUnitInstallDir. $(STATIC_UNITINSTALLDIR)
@$(ECHO) SharedUnitInstallDir. $(SHARED_UNITINSTALLDIR)
@$(ECHO) LibInstallDir........ $(LIBINSTALLDIR) @$(ECHO) LibInstallDir........ $(LIBINSTALLDIR)
@$(ECHO) StaticLibInstallDir.. $(STATIC_LIBINSTALLDIR) @$(ECHO) UnitInstallDir....... $(UNITINSTALLDIR)
@$(ECHO) SharedLibInstallDir.. $(SHARED_LIBINSTALLDIR) @$(ECHO) SourceInstallDir..... $(SOURCEINSTALLDIR)
@$(ECHO) MsgInstallDir........ $(MSGINSTALLDIR)
@$(ECHO) DocInstallDir........ $(DOCINSTALLDIR) @$(ECHO) DocInstallDir........ $(DOCINSTALLDIR)
@$(ECHO) ExtraInstallDir...... $(EXTRAINSTALLDIR)
@$(ECHO) @$(ECHO)
##################################################################### #####################################################################