Browse Source

* more architecture independance

marco 21 years ago
parent
commit
b0d7f0a9f3

+ 22 - 2
docs/crtex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -49,7 +69,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 22 - 2
docs/dosex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -55,7 +75,7 @@ clean :
 	
 	
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 	
 $(LOGFILE): %.log: %.exe 
 	$* > $*.log

+ 22 - 2
docs/dynlibex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -48,7 +68,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 22 - 2
docs/go32ex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -49,7 +69,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 22 - 2
docs/gpmex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -47,7 +67,7 @@ clean :
 	rm -f *.o *.s $(OBJECTS) $(TEXOBJECTS)
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 22 - 2
docs/graphex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -48,7 +68,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 22 - 2
docs/heapex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -48,7 +68,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 22 - 2
docs/ipcex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -48,7 +68,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 23 - 3
docs/kbdex/Makefile

@@ -5,7 +5,27 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
+
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -50,7 +70,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*
@@ -58,4 +78,4 @@ $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 ex9: ex9.pp logkeys.ppu
 
 logkeys.ppu: logkeys.pp
-	$(PP) $(PPOPTS) logkeys.pp
+	$(FPC) $(PPOPTS) logkeys.pp

+ 21 - 2
docs/linuxex/Makefile

@@ -5,7 +5,26 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -54,7 +73,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 3
docs/mathex/Makefile

@@ -5,8 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
-
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
 
@@ -65,7 +82,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll *.log *.tmp
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 3
docs/mmouseex/Makefile

@@ -5,8 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
-
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
 
@@ -49,7 +66,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 21 - 2
docs/mouseex/Makefile

@@ -5,7 +5,26 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -50,7 +69,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 3
docs/objectex/Makefile

@@ -5,8 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
-
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
 
@@ -64,7 +81,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll *.ppw *.log *.tmp 
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS) myobject.tex mysortc.tex: %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 2
docs/optex/Makefile

@@ -5,8 +5,26 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
 
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
 
@@ -48,7 +66,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 2
docs/printex/Makefile

@@ -5,7 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -48,7 +66,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 21 - 4
docs/progex/Makefile

@@ -5,8 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
-
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
 
@@ -54,7 +71,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp $(LIBOBJECT)
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*
@@ -63,7 +80,7 @@ $(CTEXOBJECTS): %.tex: %.c head.tex foot.tex
 	$(C2TEX) $*
 
 libsubs.so: subs.pp
-	$(PP) $(PPOPTS) $<
+	$(FPC) $(PPOPTS) $<
 
 ctest: ctest.c libsubs.so
 	$(CC) -o ctest ctest.c -lsubs

+ 20 - 2
docs/refex/Makefile

@@ -5,7 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -72,7 +90,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll *.log *.tmp
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 2
docs/sockex/Makefile

@@ -5,7 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -48,7 +66,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 3
docs/stringex/Makefile

@@ -5,8 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
-
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
 
@@ -57,7 +74,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll *.log *.tmp
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 21 - 2
docs/sysutex/Makefile

@@ -5,7 +5,26 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
+
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
@@ -71,7 +90,7 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll *.ppw *.tmp *.log *.dat
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*

+ 20 - 5
docs/typinfex/Makefile

@@ -5,8 +5,25 @@
 #######################################################################
 
 # Compiler
-PP=ppc386
-
+ifndef FPC
+ifdef PP
+FPC=$(PP)
+endif
+endif
+ifndef FPC
+FPCPROG:=$(strip $(wildcard $(addsuffix /fpc$(SRCEXEEXT),$(SEARCHPATH))))
+ifneq ($(FPCPROG),)
+FPCPROG:=$(firstword $(FPCPROG))
+FPC:=$(shell $(FPCPROG) -PB)
+ifneq ($(findstring Error,$(FPC)),)
+override FPC=ppc386
+endif
+else
+override FPC=ppc386
+endif
+endif
+override FPC:=$(subst $(SRCEXEEXT),,$(FPC))
+override FPC:=$(subst \,/,$(FPC))$(SRCEXEEXT)
 # Unit directory
 # UNITDIR=/usr/lib/ppc/0.99.0/linuxunits
 
@@ -60,10 +77,8 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll *.tmp *.log rttiobj.ppw
  
 $(OBJECTS): %: %.pp
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 	
-	
-
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*