Browse Source

* fix for architecture dependance

marco 21 years ago
parent
commit
f4bbd23367
1 changed files with 22 additions and 3 deletions
  1. 22 3
      docs/videoex/Makefile

+ 22 - 3
docs/videoex/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
@@ -52,10 +71,10 @@ clean :
 	rm -f *.ow *.sw *.exe *.dll
  
 $(OBJECTS): %: %.pp vidutil.ppu
-	$(PP) $(PPOPTS) $*
+	$(FPC) $(PPOPTS) $*
 
 $(TEXOBJECTS): %.tex: %.pp head.tex foot.tex
 	$(PP2TEX) $*
 
 vidutil.ppu: vidutil.pp
-	$(PP) $(PPOPTS) vidutil.pp
+	$(FPC) $(PPOPTS) vidutil.pp