diff --git a/docs/crtex/Makefile b/docs/crtex/Makefile index 7cbdc57d2a..dbd1eba56d 100644 --- a/docs/crtex/Makefile +++ b/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) $* diff --git a/docs/dosex/Makefile b/docs/dosex/Makefile index 92e3a0f876..ad0a7a89a4 100644 --- a/docs/dosex/Makefile +++ b/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 diff --git a/docs/dynlibex/Makefile b/docs/dynlibex/Makefile index 806d226265..5b146d2e78 100644 --- a/docs/dynlibex/Makefile +++ b/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) $* diff --git a/docs/go32ex/Makefile b/docs/go32ex/Makefile index 22771d4bee..abf6583771 100644 --- a/docs/go32ex/Makefile +++ b/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) $* diff --git a/docs/gpmex/Makefile b/docs/gpmex/Makefile index f2e7fa865e..abee6a8162 100644 --- a/docs/gpmex/Makefile +++ b/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) $* diff --git a/docs/graphex/Makefile b/docs/graphex/Makefile index e73b3e38dd..a7be8cc7d5 100644 --- a/docs/graphex/Makefile +++ b/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) $* diff --git a/docs/heapex/Makefile b/docs/heapex/Makefile index b721629198..65d8a09862 100644 --- a/docs/heapex/Makefile +++ b/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) $* diff --git a/docs/ipcex/Makefile b/docs/ipcex/Makefile index 1ddf649409..9cbb973d07 100644 --- a/docs/ipcex/Makefile +++ b/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) $* diff --git a/docs/kbdex/Makefile b/docs/kbdex/Makefile index 61b1f2bb90..10c781ad3f 100644 --- a/docs/kbdex/Makefile +++ b/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 \ No newline at end of file + $(FPC) $(PPOPTS) logkeys.pp diff --git a/docs/linuxex/Makefile b/docs/linuxex/Makefile index ab11e0d98f..c1b004ceeb 100644 --- a/docs/linuxex/Makefile +++ b/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) $* diff --git a/docs/mathex/Makefile b/docs/mathex/Makefile index 05dac26515..24ebbbf3ea 100644 --- a/docs/mathex/Makefile +++ b/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) $* diff --git a/docs/mmouseex/Makefile b/docs/mmouseex/Makefile index 0d055609d9..f78b574d19 100644 --- a/docs/mmouseex/Makefile +++ b/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) $* diff --git a/docs/mouseex/Makefile b/docs/mouseex/Makefile index 48e456f67f..9e31020cbf 100644 --- a/docs/mouseex/Makefile +++ b/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) $* diff --git a/docs/objectex/Makefile b/docs/objectex/Makefile index 914c742f93..b315120ff6 100644 --- a/docs/objectex/Makefile +++ b/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) $* diff --git a/docs/optex/Makefile b/docs/optex/Makefile index 309cddf58c..91e68367df 100644 --- a/docs/optex/Makefile +++ b/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) $* diff --git a/docs/printex/Makefile b/docs/printex/Makefile index ea9f184c39..7be54763cb 100644 --- a/docs/printex/Makefile +++ b/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) $* diff --git a/docs/progex/Makefile b/docs/progex/Makefile index 4b11de8115..599ef035b5 100644 --- a/docs/progex/Makefile +++ b/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 diff --git a/docs/refex/Makefile b/docs/refex/Makefile index fae5b6182e..8c8cfcac15 100644 --- a/docs/refex/Makefile +++ b/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) $* diff --git a/docs/sockex/Makefile b/docs/sockex/Makefile index f584faecd0..be4b05de96 100644 --- a/docs/sockex/Makefile +++ b/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) $* diff --git a/docs/stringex/Makefile b/docs/stringex/Makefile index e04d9c7695..2e9d3c6404 100644 --- a/docs/stringex/Makefile +++ b/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) $* diff --git a/docs/sysutex/Makefile b/docs/sysutex/Makefile index b7149bd15f..c30a55fcbf 100644 --- a/docs/sysutex/Makefile +++ b/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) $* diff --git a/docs/typinfex/Makefile b/docs/typinfex/Makefile index e64f51fb8a..1c6baad0d8 100644 --- a/docs/typinfex/Makefile +++ b/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) $*