136 lines
3.3 KiB
Plaintext
136 lines
3.3 KiB
Plaintext
#This file is part of SECONDO.
|
|
#
|
|
#Copyright (C) 2004, University in Hagen, Department of Computer Science,
|
|
#Database Systems for New Applications.
|
|
#
|
|
#SECONDO is free software; you can redistribute it and/or modify
|
|
#it under the terms of the GNU General Public License as published by
|
|
#the Free Software Foundation; either version 2 of the License, or
|
|
#(at your option) any later version.
|
|
#
|
|
#SECONDO is distributed in the hope that it will be useful,
|
|
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
#GNU General Public License for more details.
|
|
#
|
|
#You should have received a copy of the GNU General Public License
|
|
#along with SECONDO; if not, write to the Free Software
|
|
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
#
|
|
# Check if Prolog variables are set and define macros used for
|
|
# compilation of the optimizer.
|
|
ifneq ($(OptMsg),"true")
|
|
ifeq ($(platform),win32)
|
|
|
|
ifndef SWI_HOME_DIR
|
|
$(warning Variable SWI_HOME_DIR not defined. If you want to use the optimizer you have to set it up!)
|
|
endif
|
|
|
|
endif
|
|
|
|
ifdef PL_INCLUDE_DIR
|
|
ifdef PL_LIB_DIR
|
|
optimizer := "true"
|
|
else
|
|
$(warning Variable PL_LIB_DIR not defined. If you want to use the optimizer you have to set it up!)
|
|
endif
|
|
else
|
|
$(warning Variable PL_INCLUDE_DIR not defined. If you want to use the optimizer you have to set it up!)
|
|
endif
|
|
|
|
ifndef PL_LIB
|
|
ifeq ($(platform),mac_osx)
|
|
PL_LIB = swipl
|
|
else
|
|
PL_LIB = pl
|
|
endif
|
|
endif
|
|
|
|
export PL_LIB_DIR PL_INCLUDE_DIR PL_LIB optimizer
|
|
export OptMsg := "true"
|
|
endif
|
|
|
|
ifeq ($(optimizer),"true")
|
|
OPTIMIZER_SERVER := optserver
|
|
AUXLIBS := $(SECONDO_SDK)/auxtools/lib
|
|
|
|
|
|
|
|
|
|
STDPLLDFLAGS := -L$(PL_LIB_DIR) -l$(PL_LIB)
|
|
|
|
ifdef STATIC_PL_LIB
|
|
STDPLLDFLAGS := $(STATIC_PL_LIB)
|
|
endif
|
|
|
|
|
|
# compilation options for the PROLOG shell
|
|
ifeq ($(platform),win32)
|
|
PLLDFLAGS := $(STDPLLDFLAGS) -lm
|
|
endif
|
|
|
|
platform2 := $(subst 64,,$(platform))
|
|
ifeq ($(platform2),linux)
|
|
ifndef GMP_LIB
|
|
PLVER := $(shell if [ $(PL_VERSION) -lt 50600 ]; then echo "5x"; else echo "6x"; fi)
|
|
ifeq ($(PLVER), 6x)
|
|
LD_GMP := -lgmpxx -lgmp
|
|
endif
|
|
else
|
|
LD_GMP := -l$(GMP_LIB)
|
|
endif
|
|
PLLDFLAGS := $(STDPLLDFLAGS) -lreadline -lncurses -lm -L$(AUXLIBS) $(LD_GMP)
|
|
endif
|
|
|
|
ifndef LIBREADLINE
|
|
LIBREADLINE=$(AUXLIBS)/libreadline.a
|
|
endif
|
|
|
|
ifeq ($(platform),mac_osx)
|
|
PLLDFLAGS := $(STDPLLDFLAGS) $(LIBREADLINE) -lncurses -lm
|
|
endif
|
|
|
|
PLLDFLAGS += -loptparser
|
|
|
|
# define directories for using jpl
|
|
|
|
ifndef PL_VERSION
|
|
JPLVER=10
|
|
else
|
|
|
|
ifeq ($(shell test $(PL_VERSION) -lt 50200; echo $$?),0)
|
|
JPLVER=10
|
|
endif
|
|
ifeq ($(shell test $(PL_VERSION) -lt 70000; echo $$?),0)
|
|
JPLVER=30
|
|
endif
|
|
ifeq ($(shell test $(PL_VERSION) -lt 82000; echo $$?),0)
|
|
JPLVER=70
|
|
endif
|
|
ifeq ($(shell test $(PL_VERSION) -ge 82000; echo $$?),0)
|
|
JPLVER=82
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(JPLVER),10)
|
|
JPL_HEADER=jpl_fli_Prolog.h
|
|
else
|
|
JPL_HEADER=jpl.h
|
|
endif
|
|
|
|
JPL_ROOT := $(BUILDDIR)/Jpl
|
|
JPL_LIB := $(JPL_ROOT)/lib
|
|
JPL_CLASS_TARGET := $(JPL_LIB)/classes
|
|
JPL_JAVA_SOURCES := $(JPL_ROOT)/jsrc/$(JPLVER)
|
|
JPL_DOC_TARGET := $(JPL_ROOT)/doc
|
|
JPL_CLASSPATH := .:$(JPL_CLASS_TARGET)
|
|
ifdef SECONDO_JAVART
|
|
JPL_CLASSPATH := $(JPL_CLASSPATH):$(SECONDO_JAVART)
|
|
endif
|
|
JPL_SRC := $(JPL_ROOT)/src
|
|
# directory which contains SecondoPl.o
|
|
SECONDOPL_DIR := $(BUILDDIR)/UserInterfaces
|
|
|
|
endif
|