clean up makefile

This commit is contained in:
Vitor Santos Costa
2014-02-10 23:30:21 +00:00
parent 231290bad3
commit 00f0d449ec
11 changed files with 48 additions and 60 deletions

View File

@@ -69,6 +69,9 @@ gecode.yap: $(srcdir)/gecode$(GECODE_MAJOR)_yap_hand_written.yap $(srcdir)/$(GEC
clean:
-rm -f *.o *.so *~ gecode.yap
realclean:
-rm -f $(SOBJS) Makefile
install: all
mkdir -p $(DESTDIR)$(YAPLIBDIR)
mkdir -p $(DESTDIR)$(SHAREDIR)/Yap
@@ -76,3 +79,5 @@ install: all
$(INSTALL_PROGRAM) $(SOBJS) $(DESTDIR)$(YAPLIBDIR)
$(INSTALL) gecode.yap $(DESTDIR)$(SHAREDIR)/Yap
$(INSTALL) $(srcdir)/clpfd.yap $(DESTDIR)$(SHAREDIR)/Yap/gecode
install-examples:

View File

@@ -20,11 +20,11 @@ AC_ARG_ENABLE(gecode,
fi], use_gecode=$have_gecode)
if test "$use_gecode" = no; then
ENABLE_GECODE="@# "
PKG_GECODE=""
else
ENABLE_GECODE=""
PKG_GECODE="packages/gecode"
fi
AC_SUBST(ENABLE_GECODE)
AC_SUBST(PKG_GECODE)
AC_MSG_CHECKING([if dynamic arrays are supported])
@@ -90,3 +90,8 @@ fi
AC_SUBST(GECODE_VERSION)
AC_SUBST(GECODE_EXTRALIBS)
if test "$PKG_GECODE" = "packages/gecode"; then
AC_CONFIG_FILES([packages/gecode/Makefile])
fi

View File

@@ -1,5 +0,0 @@
all:
python code-generator.py
clean:
-rm -f *~ *.pyc

View File

@@ -1,36 +0,0 @@
GECODEDIR := $(shell g++ $(CPPFLAGS) $(CXXFLAGS) -H -E gecodedir.hh 2>&1 >/dev/null | grep gecode/kernel.hh | awk '{print $$2}' | sed 's|/kernel.hh||')
GECODECONFIG := $(GECODEDIR)/support/config.hpp
GECODEVERSION := $(shell cat $(GECODECONFIG) | egrep '\<GECODE_VERSION\>' | awk '{print $$3}' | sed 's/"//g')
PROTOTYPES = ../gecode-prototypes-$(GECODEVERSION).hh
ENUMS = ../gecode-enums-$(GECODEVERSION).py
all: $(PROTOTYPES) $(ENUMS)
$(PROTOTYPES): % : xml/namespaceGecode.xml extract-prototypes.xsl
cat notice.hh > $@ || { rm -f $@; exit 1; }
xsltproc extract-prototypes.xsl $< \
| grep EXPORT \
| grep -v Symmetry \
| sed 's/Gecode:://g' \
| sed 's/< /</g' \
| sed 's/ >/>/g' \
| sed 's/ \&/\&/g' \
| sed 's/, /,/g' \
| sed 's/forceinline //g' \
| sed 's/GECODE_INT_EXPORT //g' \
| sed 's/GECODE_FLOAT_EXPORT //g' \
| sed 's/GECODE_SET_EXPORT //g' \
| grep -v '*' | sort >> $@ || { rm -f $@; exit 1; }
$(ENUMS): % : xml/namespaceGecode.xml extract-enums.xsl
cat notice.py > $@ || { rm -f $@; exit 1; }
xsltproc extract-enums.xsl $< >> $@ || { rm -f $@; exit 1; }
xml/namespaceGecode.xml: Doxyfile
doxygen Doxyfile
Doxyfile: Doxyfile.in
cat $< | sed "s#@GECODEDIR@#$(GECODEDIR)#" > $@ || { rm -f $@; exit 1; }
clean:
-rm -rf *~ gecode-prototypes-*.hh gecode-enums-*.py Doxyfile xml