* updated for new fpcmake

This commit is contained in:
peter 1999-11-23 09:45:48 +00:00
parent 828f946f81
commit 6c9c099766
2 changed files with 173 additions and 152 deletions

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-23 09:33
#
defaultrule: all
@ -118,7 +118,7 @@ endif
# Targets
EXEOBJECTS=ppudump ppumove ppdep ptop rstconv fpcmake data2inc
EXEOBJECTS=ppufiles ppudump ppumove ppdep ptop rstconv fpcmake data2inc
# Clean
@ -135,11 +135,17 @@ EXTRACLEANUNITS=ppu ptopu
ifndef FPCDIR
FPCDIR=..
endif
override NEEDUNITDIR=$(FPCDIR)/fcl/$(OS_TARGET)
ifndef PACKAGEDIR
PACKAGEDIR=$(FPCDIR)/packages
endif
ifndef TARGETDIR
TARGETDIR=.
endif
# Packages
override NEEDUNITDIR+=$(FPCDIR)/fcl/$(OS_TARGET)
# Libraries
@ -158,6 +164,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
@ -167,43 +178,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
@ -215,16 +191,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
@ -234,15 +200,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
@ -253,42 +232,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
@ -327,8 +273,8 @@ override FPCOPT+=-FE$(TARGETDIR)
endif
# Smartlinking
ifeq ($(SMARTLINK),YES)
override FPCOPT+=-Cx
ifdef SMARTLINK
override FPCOPT+=-CX
endif
# Add commandline options
@ -425,16 +371,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
@ -470,6 +406,46 @@ 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
# data2inc
ifndef DATA2INC
DATA2INC:=$(strip $(wildcard $(addsuffix /data2inc$(EXEEXT),$(SEARCHPATH))))
ifeq ($(DATA2INC),)
DATA2INC=
else
export DATA2INC:=$(firstword $(DATA2INC))
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
@ -611,27 +587,21 @@ 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
staticlib: fpc_staticlib
smart: fpc_smart
sharedlib: fpc_sharedlib
shared: fpc_shared
showinstall: fpc_showinstall
staticinstall: fpc_staticinstall
sharedinstall: fpc_sharedinstall
libinstall: fpc_libinstall
zipinstall: fpc_zipinstall
zipinstalladd: fpc_zipinstalladd
clean_all: fpc_clean_all
cleanall: fpc_cleanall
depend: fpc_depend
@ -644,12 +614,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
@ -689,18 +663,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
@ -715,16 +688,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))
@ -733,11 +717,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:
@ -756,13 +746,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
#####################################################################
@ -834,13 +831,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:
@ -850,23 +847,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
@ -897,6 +895,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)
@ -909,14 +921,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)
#####################################################################
@ -952,10 +961,15 @@ ptopu$(PPUEXT): ptopu.pp
# Other
#
fpcmake$(EXEEXT): fpcmake.pp
fpcmake.inc: fpcmake.ini
$(DATA2INC) -b -s fpcmake.ini fpcmake.inc fpcmakeini
fpcmake$(EXEEXT): fpcmake.pp fpcmake.inc
ppdep$(EXEEXT): ppdep.pp
data2inc$(EXEEXT): data2inc.pp
#
# H2Pas
#

View File

@ -1,17 +1,21 @@
#
# Makefile.fpc for shedit
# Makefile.fpc for Free Pascal Utils
#
[targets]
units=
programs=ppudump ppumove ppdep ptop rstconv fpcmake data2inc
programs=ppufiles ppudump ppumove ppdep ptop rstconv fpcmake data2inc
[clean]
units=ppu ptopu
[packages]
fcl=1
[tools]
tooldata2inc=1
[dirs]
fpcdir=..
unitdir=$(FPCDIR)/fcl/$(OS_TARGET)
targetdir=.
[rules]
@ -43,7 +47,10 @@ ptopu$(PPUEXT): ptopu.pp
# Other
#
fpcmake$(EXEEXT): fpcmake.pp
fpcmake.inc: fpcmake.ini
$(DATA2INC) -b -s fpcmake.ini fpcmake.inc fpcmakeini
fpcmake$(EXEEXT): fpcmake.pp fpcmake.inc
ppdep$(EXEEXT): ppdep.pp