* 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
@ -136,6 +136,12 @@ override NEEDOPT=-Sg
ifndef FPCDIR
FPCDIR=../..
endif
ifndef PACKAGEDIR
PACKAGEDIR=$(FPCDIR)/packages
endif
# Packages
# Libraries
@ -155,6 +161,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
@ -164,43 +175,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
@ -212,16 +188,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
@ -231,15 +197,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
@ -250,42 +229,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
@ -315,8 +261,8 @@ endif
endif
# Smartlinking
ifeq ($(SMARTLINK),YES)
override FPCOPT+=-Cx
ifdef SMARTLINK
override FPCOPT+=-CX
endif
# Add commandline options
@ -413,16 +359,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
@ -458,6 +394,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
@ -599,26 +565,20 @@ 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
@ -638,12 +598,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
@ -683,18 +647,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
@ -709,16 +672,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))
@ -727,11 +701,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:
@ -750,13 +730,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
#####################################################################
@ -828,13 +815,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:
@ -844,23 +831,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
@ -891,6 +879,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)
@ -903,14 +905,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)
#####################################################################