Makefile 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # $OpenBSD: Makefile,v 1.6 2015/03/16 18:07:50 naddy Exp $
  2. COMMENT = mixed integer linear programming solver
  3. DISTNAME = lp_solve_${V}_source
  4. PKGNAME = lpsolve-${V}
  5. REVISION = 1
  6. WRKDIST = ${WRKDIR}/lp_solve_${V_MAJOR}
  7. SHARED_LIBS = lpsolve55 0.0 # unversioned upstream
  8. WANTLIB += c m
  9. # Docs are distributed separately
  10. DOCDISTFILE = lp_solve_5.5.2.0_doc${EXTRACT_SUFX}
  11. DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \
  12. ${DOCDISTFILE}
  13. EXTRACT_ONLY = ${DISTNAME}${EXTRACT_SUFX}
  14. # Build is a series of shell scripts
  15. MAKE_ENV += CC=${CC} LIBlpsolve55_VERSION=${LIBlpsolve55_VERSION} \
  16. WRKDIR=${WRKDIR}
  17. do-build:
  18. mkdir ${WRKDIR}/tmp # builds programs here to check for features
  19. cd ${WRKSRC}/lpsolve55 && \
  20. ${MAKE_ENV} sh -x ccc
  21. cd ${WRKSRC}/lp_solve && ${MAKE_ENV} sh -x ccc
  22. cd ${WRKSRC}/demo && ${MAKE_ENV} sh -x ccc
  23. EXAMPLEDIR = ${PREFIX}/share/examples/lpsolve
  24. do-install:
  25. @# Libs
  26. ${INSTALL_DATA} ${WRKSRC}/lpsolve55/bin/liblpsolve55.a ${PREFIX}/lib/
  27. ${INSTALL_DATA} \
  28. ${WRKSRC}/lpsolve55/bin/liblpsolve55.so.${LIBlpsolve55_VERSION} \
  29. ${PREFIX}/lib/
  30. @# Headers
  31. ${INSTALL_DATA_DIR} ${PREFIX}/include/lpsolve/
  32. .for i in declare.h fortify.h ini.h lp_*.h lpkit.h lpsolve.h ufortify.h yacc_read.h
  33. ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/include/lpsolve/
  34. .endfor
  35. @# Standalone solver
  36. ${INSTALL_PROGRAM} ${WRKSRC}/lp_solve/bin/lp_solve ${PREFIX}/bin/
  37. @# Demo program
  38. ${INSTALL_PROGRAM} ${WRKSRC}/demo/demo ${PREFIX}/bin/lp_solve_demo
  39. ${INSTALL_DATA_DIR} ${EXAMPLEDIR}
  40. ${INSTALL_DATA} ${WRKSRC}/demo/demo.c ${EXAMPLEDIR}
  41. # Install docs from separate docs tarball
  42. DOCDIR = ${PREFIX}/share/doc/lpsolve
  43. post-install:
  44. ${INSTALL_DATA_DIR} ${DOCDIR}
  45. ${TAR} zxf ${DISTDIR}/${DOCDISTFILE} -C ${DOCDIR}
  46. chown -R ${SHAREOWN}:${SHAREGRP} ${DOCDIR}
  47. NO_TEST = Yes
  48. .include <bsd.port.mk>