From: Florian Schanda <florian.schanda@altran-praxis.com>
Date: Tue, 15 Mar 2011 20:07:27 +0000
Subject: This is the makefile fix
Origin: upstream
--- a/simplifier/Makefile
+++ b/simplifier/Makefile
@@ -50,6 +50,12 @@
     PATH:=/usr/bin:${PATH}
 endif
 
+SWI_GOAL = \
+   expects_dialect('sicstus'),            \
+   redefine_system_predicate(apply(_,_)), \
+   style_check(-singleton),               \
+   compile('simplifier.pro'),             \
+
 ################################################################################
 # TARGETS
 ################################################################################
@@ -61,12 +67,10 @@
 # and includes respectively.
 
 ${OUTPUTNAME_SIMPLIFIER}${EXE_EXTN}: *.pro
-	sicstus ${SICSTUS_SWITCHES} --goal "compile('simplifier.pro'), add_system_toolname('Simplifier'), buildsav_simplifier."
-	spld ${SPLD_CONF} -o $@ --static --resources=${OUTPUTNAME_SIMPLIFIER}${SAV_EXTN}=/${OUTPUTNAME_SIMPLIFIER}${SAV_EXTN},${SICSTUS_LIBS}
+	swipl -O -g "$(SWI_GOAL) add_system_toolname('Simplifier'), swisav_simplifier."
 
 ${OUTPUTNAME_ZOMBIESCOPE}${EXE_EXTN}: *.pro
-	sicstus ${SICSTUS_SWITCHES} --goal "compile('simplifier.pro'), add_system_toolname('ZombieScope'), buildsav_zombiescope."
-	spld ${SPLD_CONF} -o $@ --static --resources=${OUTPUTNAME_ZOMBIESCOPE}${SAV_EXTN}=/${OUTPUTNAME_ZOMBIESCOPE}${SAV_EXTN},${SICSTUS_LIBS}
+	swipl -O -g "$(SWI_GOAL) add_system_toolname('ZombieScope'), swisav_zombiescope."
 
 # Manifest only required on Windows.
 ifeq ($(findstring ${TARGET},Windows),${TARGET})
