59 lines
1.4 KiB
Makefile
59 lines
1.4 KiB
Makefile
PACKAGE=swig
|
|
DOC=swig
|
|
PKGCFLAGS=
|
|
SWIG=@SWIG@
|
|
JAVAC=@JAVAC@
|
|
JAR=@JAR@
|
|
include ../Makefile.defs
|
|
DEFS=@DEFS@ -D_YAP_NOT_INSTALLED_=1 -DDESTDIR=\"$(DESTDIR)\"
|
|
YAP_EXTRAS=@YAP_EXTRAS@
|
|
CPPFLAGS=@CPPFLAGS@ -I../.. -I$(srcdir)/../../H -I$(srcdir)/../../include -I$(srcdir)/../../os -I$(srcdir)/../../OPTYap -I$(srcdir)/../../BEAM -I$(srcdir)/../../CXX
|
|
CXXFLAGS= @SHLIB_CXXFLAGS@ $(YAP_EXTRAS) $(DEFS) $(CPPFLAGS)
|
|
|
|
PROGRAMS= \
|
|
|
|
SWIG_FILES= \
|
|
$(srcdir)/yap.i
|
|
|
|
all: python java R
|
|
|
|
python: $(SWIG_FILES) python/_yap.so python/yap.py
|
|
|
|
python/_yap.so: python/yap_wrap.o
|
|
$(CXX) -shared $(LDSOFLAGS) -o python/_yap.so python/yap_wrap.o ../../yapi.o $(LIBS) @PYTHON_LIBS@ -L ../.. -lYap -lpthread
|
|
|
|
python/yap_wrap.c: $(srcdir)/yap.i
|
|
$(SWIG) -c++ -python -outdir python -o $@ $(DEFS) $(CPPFLAGS) -Wall $<
|
|
|
|
python/yap_wrap.o: python/yap_wrap.c
|
|
$(CXX) -c $(CXXFLAGS) @PYTHON_INCLUDES@ $< -o $@
|
|
|
|
java: jni/libyap.@SO@ java/yap.java
|
|
cd java ; $(JAVAC) *.java; $(JAR) cvf yap.jar *.class
|
|
|
|
jni/libyap.@SO@: jni/yap_wrap.o
|
|
$(CXX) -shared $(LDSOFLAGS) -L ../.. -lYap -o $@ ../../yapi.o $< $(LIBS) @JPLLDFLAGS@ -L ../.. -lYap -lpthread
|
|
|
|
jni/yap_wrap.c: $(srcdir)/yap.i
|
|
$(SWIG) -c++ -java -package pt.up.fc.dcc.yap -outdir java -o $@ $(DEFS) $(CPPFLAGS) -Wall $<
|
|
|
|
jni/yap_wrap.o: jni/yap_wrap.c
|
|
$(CXX) -c $(CXXFLAGS) @JPLCFLAGS@ $< -o $@
|
|
|
|
R:
|
|
|
|
|
|
yap.i: $(srcdir)/../../include/YapInterface.h
|
|
|
|
install:
|
|
|
|
|
|
clean:
|
|
rm -f */*
|
|
|
|
distclean: clean
|
|
rm -f *def Makefile
|
|
|
|
|
|
##########
|