|
@@ -86,21 +86,19 @@ ifndef FPCLANG
|
|
|
FPCLANG=e
|
|
|
endif
|
|
|
|
|
|
-# Local defines for the compiler only
|
|
|
-ifndef LOCALDEF
|
|
|
-LOCALDEF=
|
|
|
-endif
|
|
|
-
|
|
|
# Local options for the compiler only
|
|
|
ifndef LOCALOPT
|
|
|
-LOCALOPT=$(OPT)
|
|
|
+LOCALOPT:=$(OPT)
|
|
|
endif
|
|
|
|
|
|
# Options for the RTL only when cycling
|
|
|
-ifndef RTLOPTS
|
|
|
-RTLOPTS=$(OPT)
|
|
|
+ifndef RTLOPT
|
|
|
+RTLOPT:=$(OPT)
|
|
|
endif
|
|
|
|
|
|
+# Make OPT empty. It is copied to LOCALOPT and RTLOPT
|
|
|
+override OPT=
|
|
|
+
|
|
|
# Message files
|
|
|
MSGFILES=$(wildcard msg/error*.msg)
|
|
|
|
|
@@ -131,94 +129,94 @@ endif
|
|
|
# will conflict with our -d$(PPC_TARGET)
|
|
|
NOCPUDEF=1
|
|
|
|
|
|
+# Default message file
|
|
|
+MSGFILE=msg/error$(FPCLANG).msg
|
|
|
+
|
|
|
# Define Unix also for Linux
|
|
|
ifeq ($(OS_TARGET),linux)
|
|
|
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
|
-override LOCALDEF+=-dUNIX
|
|
|
+override LOCALOPT+=-dUNIX
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
ifeq ($(OS_TARGET),freebsd)
|
|
|
ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
|
-override LOCALDEF+=-dUNIX
|
|
|
+override LOCALOPT+=-dUNIX
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
-# Default message file
|
|
|
-MSGFILE=msg/error$(FPCLANG).msg
|
|
|
-
|
|
|
# set correct defines (-d$(CPU_TARGET) is automaticly added in makefile.fpc)
|
|
|
-override LOCALDEF+=-d$(PPC_TARGET) -dGDB -dBROWSERLOG
|
|
|
+override LOCALOPT+=-d$(PPC_TARGET) -dGDB -dBROWSERLOG
|
|
|
|
|
|
# i386 specific
|
|
|
ifeq ($(PPC_TARGET),i386)
|
|
|
-override LOCALDEF+=-Fux86
|
|
|
+override LOCALOPT+=-Fux86
|
|
|
endif
|
|
|
|
|
|
# x86_64 specific
|
|
|
ifeq ($(PPC_TARGET),x86_64)
|
|
|
-override LOCALDEF+=-Fux86
|
|
|
+override LOCALOPT+=-Fux86
|
|
|
endif
|
|
|
|
|
|
# PowerPC specific
|
|
|
ifeq ($(PPC_TARGET),powerpc)
|
|
|
-override LOCALDEF+=
|
|
|
+override LOCALOPT+=
|
|
|
endif
|
|
|
|
|
|
# m68k specific
|
|
|
ifeq ($(PPC_TARGET),m68k)
|
|
|
-override LOCALDEF+=-dNOOPT
|
|
|
+override LOCALOPT+=-dNOOPT
|
|
|
endif
|
|
|
|
|
|
# Sparc specific
|
|
|
ifeq ($(PPC_TARGET),sparc)
|
|
|
-override LOCALDEF+=
|
|
|
+override LOCALOPT+=
|
|
|
endif
|
|
|
|
|
|
# m68k specific with low stack
|
|
|
ifeq ($(PPC_TARGET),m68k)
|
|
|
ifeq ($(OS_TARGET),amiga)
|
|
|
-override LOCALDEF+=-Ct
|
|
|
-endif
|
|
|
-endif
|
|
|
-
|
|
|
-ifeq ($(PPC_TARGET),m68k)
|
|
|
-ifeq ($(OS_TARGET),amiga)
|
|
|
-override LOCALDEF+=-Ct
|
|
|
+override LOCALOPT+=-Ct
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
# ARM specific
|
|
|
ifeq ($(PPC_TARGET),arm)
|
|
|
-override LOCALDEF+=-dNOOPT
|
|
|
+override LOCALOPT+=-dNOOPT
|
|
|
endif
|
|
|
|
|
|
-PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc.exe,$(SEARCHPATH))))
|
|
|
-ifeq ($(PASDOC),)
|
|
|
-PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc,$(SEARCHPATH))))
|
|
|
+[rules]
|
|
|
+#####################################################################
|
|
|
+# Setup Targets
|
|
|
+#####################################################################
|
|
|
+
|
|
|
+ifeq ($(OS_TARGET),win32)
|
|
|
+ifdef CMP
|
|
|
+override DIFF:=$(CMP) -i218
|
|
|
endif
|
|
|
-ifeq ($(PASDOC),)
|
|
|
-PASDOC:=../projects/pasdoc/bin/pasdoc
|
|
|
-else
|
|
|
-PASDOC:=$(firstword $(PASDOC))
|
|
|
endif
|
|
|
|
|
|
-override LOCALOPT+=$(LOCALDEF)
|
|
|
+# Add Local options
|
|
|
+override COMPILER+=$(LOCALOPT)
|
|
|
|
|
|
-override FPCOPT:=$(LOCALOPT)
|
|
|
+# Disable optimizer when compiled with 1.0.x
|
|
|
+ifneq ($(findstring 1.0.,$(FPC_VERSION)),)
|
|
|
+override COMPILER:=$(patsubst -O%,,$(COMPILER))
|
|
|
+endif
|
|
|
|
|
|
|
|
|
-[rules]
|
|
|
#####################################################################
|
|
|
-# Setup Targets
|
|
|
+# PASDoc
|
|
|
#####################################################################
|
|
|
|
|
|
-ifeq ($(OS_TARGET),win32)
|
|
|
-ifdef CMP
|
|
|
-override DIFF:=$(CMP) -i218
|
|
|
+PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc.exe,$(SEARCHPATH))))
|
|
|
+ifeq ($(PASDOC),)
|
|
|
+PASDOC:=$(strip $(wildcard $(addsuffix /pasdoc,$(SEARCHPATH))))
|
|
|
endif
|
|
|
-# force try to smartlink for windows unit
|
|
|
-override COMPILER+=-XX
|
|
|
+ifeq ($(PASDOC),)
|
|
|
+PASDOC:=../projects/pasdoc/bin/pasdoc
|
|
|
+else
|
|
|
+PASDOC:=$(firstword $(PASDOC))
|
|
|
endif
|
|
|
|
|
|
|
|
@@ -305,24 +303,6 @@ clean: tempclean execlean cleanall $(addsuffix _clean,$(PPC_TARGET)) $(addsuffix
|
|
|
distclean: tempclean execlean cleanall $(addsuffix _clean,$(CYCLETARGETS)) $(addsuffix _distclean,$(TARGET_DIRS))
|
|
|
|
|
|
|
|
|
-#####################################################################
|
|
|
-# Include depencies
|
|
|
-#####################################################################
|
|
|
-
|
|
|
-$(MAKEDEP): $(UTILSDIR)/ppdep.pp
|
|
|
- $(COMPILER) $(UTILSDIR)/ppdep.pp
|
|
|
- $(COPY) $(UTILSDIR)/$(MAKEDEP) $(MAKEDEP)
|
|
|
-
|
|
|
-dependencies : $(MAKEDEP)
|
|
|
- $(MAKEDEP) pp.pas $(FPCOPTDEF) $(LOCALDEF) '-F$$(COMPILER) $$(LOCALOPT)' > depend
|
|
|
-
|
|
|
-ifdef USEDEPEND
|
|
|
-
|
|
|
-include depend
|
|
|
-
|
|
|
-endif
|
|
|
-
|
|
|
-
|
|
|
#####################################################################
|
|
|
# Make targets
|
|
|
#####################################################################
|
|
@@ -469,7 +449,7 @@ extcycle:
|
|
|
$(MAKE) cycle OPT='-n -OG2p3 -gl -CRriot -dEXTDEBUG'
|
|
|
|
|
|
cvstest:
|
|
|
- $(MAKE) cycle 'LOCALOPT=-n -Se' 'RTLOPTS=-n -Se'
|
|
|
+ $(MAKE) cycle 'LOCALOPT=-n -Se' 'RTLOPT=-n -Se'
|
|
|
|
|
|
|
|
|
##########################
|
|
@@ -553,7 +533,7 @@ endif
|
|
|
.PHONY: rtl rtlclean rtlinstall
|
|
|
|
|
|
rtl:
|
|
|
- $(MAKE) -C $(PACKAGEDIR_RTL) 'OPT=$(RTLOPTS)' all
|
|
|
+ $(MAKE) -C $(PACKAGEDIR_RTL) 'OPT=$(RTLOPT)' all
|
|
|
|
|
|
rtlclean:
|
|
|
$(MAKE) -C $(PACKAGEDIR_RTL) clean
|