UseModules := common graph

ExternalLibs := cdd lrs

LibModules := cutting_plane transform lrs_interface cdd_interface cdd_float_interface

ExtraModules := prism-coord product-coord wedge-coord SchlegelWindow beneath_beyond-algo

prism$(suffix) : prism-coord$O
product$(suffix) : product-coord$O
wedge$(suffix) : wedge-coord$O
schlegel_interactive$(suffix) : SchlegelWindow$O
beneath_beyond$(suffix) : beneath_beyond-algo$O

lrs_interface$(LO) : ExtraCXXFLAGS = -I$(BuildDir)/external/lrs/src
lrs_interface$(LO) : ExtraLIBS = $(BuildDir)/external/lrs/liblrsgmp$A
lrs_interface$(LO) : ExtraLDFLAGS = -r

cdd_interface$(LO)         : ExtraCXXFLAGS = -I$(BuildDir)/external/cdd/src $(call addinclude, $(ProjectTop)/ext_lib/cdd/globals_gmp.h)
cdd_interface$(LO)         : ExtraLIBS = $(BuildDir)/external/cdd/libcddgmp$A
cdd_interface$(LO)         : ExtraLDFLAGS = -r

cdd_float_interface$(LO)   : ExtraCXXFLAGS = -I$(BuildDir)/external/cdd/src
cdd_float_interface$(LO)   : ExtraLIBS = $(BuildDir)/external/cdd/libcdd$A
cdd_float_interface$(LO)   : ExtraLDFLAGS = -r

ifdef GCCversion

ifeq "$(Arch)" "darwin"
  cross dimension facets_from_incidence vertices_from_incidence lifting_step3 \
  product-coord$O polarize stellar_all_faces stellar_indep_faces stack tensor \
  schlegel_transform schlegel_vertices SchlegelWindow$O \
  : CXXOPT = -O0

  facets_from_incidence vertices_from_incidence schlegel_interactive \
  : ExtraLDFLAGS = -Wl,-m

else # MacOS X

  ifneq ($(filter 3.3%, $(GCCversion)),)
    facets_from_incidence$O : CXXOPT = -O0
    minkowski_sum$O : ExtraCXXFLAGS = -fno-strict-aliasing
    SchlegelWindow$O : CXXOPT = -O1
  endif
endif

endif # gcc


# Local Variables:
# mode: Makefile
# End:
