mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 11:18:10 +02:00
MG: Makefile update for win32api
git-svn-id: trunk@330 -
This commit is contained in:
parent
f7f706596a
commit
d681f7778c
163
Makefile
163
Makefile
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Makefile generated by fpcmake v1.00 [2001/01/09]
|
||||
# Makefile generated by fpcmake v1.00 [2000/12/30]
|
||||
#
|
||||
|
||||
defaultrule: all
|
||||
@ -50,25 +50,6 @@ else
|
||||
SRCEXEEXT=.exe
|
||||
endif
|
||||
|
||||
# The extension of batch files / scripts
|
||||
ifdef inUnix
|
||||
BATCHEXT=.sh
|
||||
else
|
||||
ifdef inOS2
|
||||
BATCHEXT=.cmd
|
||||
else
|
||||
BATCHEXT=.bat
|
||||
endif
|
||||
endif
|
||||
|
||||
# Path Separator, the subst trick is necessary for the \ that can't exists
|
||||
# at the end of a line
|
||||
ifdef inUnix
|
||||
PATHSEP=/
|
||||
else
|
||||
PATHSEP=$(subst /,\,/)
|
||||
endif
|
||||
|
||||
# The path which is searched separated by spaces
|
||||
ifdef inUnix
|
||||
SEARCHPATH=$(subst :, ,$(PATH))
|
||||
@ -195,7 +176,7 @@ endif
|
||||
|
||||
# Targets
|
||||
|
||||
override DIROBJECTS+=$(wildcard lcl lcl/interfaces components)
|
||||
override DIROBJECTS+=$(wildcard lcl components)
|
||||
override EXEOBJECTS+=lazarus
|
||||
override EXAMPLEDIROBJECTS+=examples
|
||||
|
||||
@ -320,7 +301,15 @@ LD=ld
|
||||
endif
|
||||
|
||||
# ppas.bat / ppas.sh
|
||||
PPAS=ppas$(BATCHEXT)
|
||||
ifdef inUnix
|
||||
PPAS=ppas.sh
|
||||
else
|
||||
ifdef inOS2
|
||||
PPAS=ppas.cmd
|
||||
else
|
||||
PPAS=ppas.bat
|
||||
endif
|
||||
endif
|
||||
|
||||
# ldconfig to rebuild .so cache
|
||||
ifdef inUnix
|
||||
@ -657,7 +646,7 @@ export DESTZIPDIR
|
||||
# set the base directory where to install everything
|
||||
ifndef BASEINSTALLDIR
|
||||
ifdef UNIXINSTALLDIR
|
||||
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/lazarus/$(FPC_VERSION)
|
||||
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
|
||||
else
|
||||
BASEINSTALLDIR=$(PREFIXINSTALLDIR)
|
||||
endif
|
||||
@ -692,7 +681,7 @@ endif
|
||||
# Where the source files will be stored
|
||||
ifndef SOURCEINSTALLDIR
|
||||
ifdef UNIXINSTALLDIR
|
||||
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/lazarus-$(FPC_VERSION)
|
||||
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
|
||||
else
|
||||
SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
|
||||
endif
|
||||
@ -704,7 +693,7 @@ endif
|
||||
# Where the doc files will be stored
|
||||
ifndef DOCINSTALLDIR
|
||||
ifdef UNIXINSTALLDIR
|
||||
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/lazarus-$(FPC_VERSION)
|
||||
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
|
||||
else
|
||||
DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
|
||||
endif
|
||||
@ -843,7 +832,7 @@ override FPCOPT+=-FU$(UNITTARGETDIR)
|
||||
ifeq ($(UNITTARGETDIR),.)
|
||||
override UNITTARGETDIRPREFIX=
|
||||
else
|
||||
override UNITTARGETDIRPREFIX=$(UNITTARGETDIR)/
|
||||
override UNITTARGETDIRPREFIX=$(TARGETDIR)/
|
||||
endif
|
||||
else
|
||||
ifdef TARGETDIR
|
||||
@ -1051,12 +1040,11 @@ endif
|
||||
ifdef INSTALLPPUFILES
|
||||
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
|
||||
ifdef PPUFILES
|
||||
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
|
||||
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
|
||||
else
|
||||
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
|
||||
endif
|
||||
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
|
||||
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
|
||||
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
|
||||
endif
|
||||
|
||||
ifdef INSTALLEXEFILES
|
||||
@ -1169,7 +1157,7 @@ ifndef PACKDIR
|
||||
ifndef inUnix
|
||||
PACKDIR=$(BASEDIR)/pack_tmp
|
||||
else
|
||||
PACKDIR=/tmp/lazarus-pack
|
||||
PACKDIR=/tmp/fpc-pack
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -1187,48 +1175,18 @@ USETAR=1
|
||||
endif
|
||||
endif
|
||||
|
||||
# Use a wrapper script by default for OS/2
|
||||
ifdef inOS2
|
||||
USEZIPWRAPPER=1
|
||||
endif
|
||||
|
||||
# Create commands to create the zip/tar file
|
||||
ZIPWRAPPER=$(DESTZIPDIR)/fpczip$(BATCHEXT)
|
||||
ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR))
|
||||
ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR))
|
||||
ifdef USETAR
|
||||
ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
|
||||
ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
|
||||
else
|
||||
ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
|
||||
ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
|
||||
endif
|
||||
|
||||
fpc_zipinstall:
|
||||
ifndef ZIPNAME
|
||||
@$(ECHO) "Please specify ZIPNAME!"
|
||||
@exit 1
|
||||
else
|
||||
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
|
||||
$(DEL) $(ZIPDESTFILE)
|
||||
ifdef USEZIPWRAPPER
|
||||
ifneq ($(ECHO),echo)
|
||||
$(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
|
||||
$(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
|
||||
$(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
|
||||
ifdef USETAR
|
||||
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
|
||||
cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
|
||||
else
|
||||
$(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
|
||||
$(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
|
||||
$(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
|
||||
endif
|
||||
ifdef inUnix
|
||||
/bin/sh $(ZIPWRAPPER)
|
||||
else
|
||||
$(ZIPWRAPPER)
|
||||
endif
|
||||
$(DEL) $(ZIPWRAPPER)
|
||||
else
|
||||
$(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
|
||||
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
|
||||
cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
|
||||
endif
|
||||
$(DELTREE) $(PACKDIR)
|
||||
endif
|
||||
@ -1261,12 +1219,11 @@ ifdef CLEANPPUFILES
|
||||
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
|
||||
# Get the .o and .a files created for the units
|
||||
ifdef PPUFILES
|
||||
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
|
||||
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
|
||||
else
|
||||
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
|
||||
endif
|
||||
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
|
||||
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
|
||||
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
|
||||
endif
|
||||
|
||||
fpc_clean: $(CLEANTARGET)
|
||||
@ -1373,7 +1330,6 @@ endif
|
||||
#####################################################################
|
||||
|
||||
OBJECTDIRLCL=1
|
||||
OBJECTDIRLCL/INTERFACES=1
|
||||
OBJECTDIRCOMPONENTS=1
|
||||
|
||||
# Dir lcl
|
||||
@ -1436,66 +1392,6 @@ lcl_info:
|
||||
$(MAKE) -C lcl info
|
||||
endif
|
||||
|
||||
# Dir lcl/interfaces
|
||||
|
||||
ifdef OBJECTDIRLCL/INTERFACES
|
||||
.PHONY: lcl/interfaces_all lcl/interfaces_debug lcl/interfaces_examples lcl/interfaces_test lcl/interfaces_smart lcl/interfaces_shared lcl/interfaces_showinstall lcl/interfaces_install lcl/interfaces_sourceinstall lcl/interfaces_exampleinstall lcl/interfaces_zipinstall lcl/interfaces_zipsourceinstall lcl/interfaces_zipexampleinstall lcl/interfaces_clean lcl/interfaces_distclean lcl/interfaces_cleanall lcl/interfaces_require lcl/interfaces_info
|
||||
|
||||
lcl/interfaces_all:
|
||||
$(MAKE) -C lcl/interfaces all
|
||||
|
||||
lcl/interfaces_debug:
|
||||
$(MAKE) -C lcl/interfaces debug
|
||||
|
||||
lcl/interfaces_examples:
|
||||
$(MAKE) -C lcl/interfaces examples
|
||||
|
||||
lcl/interfaces_test:
|
||||
$(MAKE) -C lcl/interfaces test
|
||||
|
||||
lcl/interfaces_smart:
|
||||
$(MAKE) -C lcl/interfaces smart
|
||||
|
||||
lcl/interfaces_shared:
|
||||
$(MAKE) -C lcl/interfaces shared
|
||||
|
||||
lcl/interfaces_showinstall:
|
||||
$(MAKE) -C lcl/interfaces showinstall
|
||||
|
||||
lcl/interfaces_install:
|
||||
$(MAKE) -C lcl/interfaces install
|
||||
|
||||
lcl/interfaces_sourceinstall:
|
||||
$(MAKE) -C lcl/interfaces sourceinstall
|
||||
|
||||
lcl/interfaces_exampleinstall:
|
||||
$(MAKE) -C lcl/interfaces exampleinstall
|
||||
|
||||
lcl/interfaces_zipinstall:
|
||||
$(MAKE) -C lcl/interfaces zipinstall
|
||||
|
||||
lcl/interfaces_zipsourceinstall:
|
||||
$(MAKE) -C lcl/interfaces zipsourceinstall
|
||||
|
||||
lcl/interfaces_zipexampleinstall:
|
||||
$(MAKE) -C lcl/interfaces zipexampleinstall
|
||||
|
||||
lcl/interfaces_clean:
|
||||
$(MAKE) -C lcl/interfaces clean
|
||||
|
||||
lcl/interfaces_distclean:
|
||||
$(MAKE) -C lcl/interfaces distclean
|
||||
|
||||
lcl/interfaces_cleanall:
|
||||
$(MAKE) -C lcl/interfaces cleanall
|
||||
|
||||
lcl/interfaces_require:
|
||||
$(MAKE) -C lcl/interfaces require
|
||||
|
||||
lcl/interfaces_info:
|
||||
$(MAKE) -C lcl/interfaces info
|
||||
endif
|
||||
|
||||
# Dir components
|
||||
|
||||
ifdef OBJECTDIRCOMPONENTS
|
||||
@ -1645,3 +1541,12 @@ tools: lcl components
|
||||
$(MAKE) -C tools
|
||||
|
||||
all: lcl components ide
|
||||
|
||||
# Win32-specific rules
|
||||
win32:
|
||||
$(MAKE) lazarus.res
|
||||
$(MAKE) -k all examples tools LCLPLATFORM=win32 OPT=-dSUPPORTS_RESOURCES
|
||||
|
||||
lazarus.res: lazarus.rc
|
||||
windres -i lazarus.rc -o lazarus.res
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user