Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # $OpenBSD: Makefile,v 1.38 2017/04/29 06:22:05 espie Exp $
  2. V = 3.3.6
  3. PKGNAME = g77-$V
  4. REVISION = 12
  5. EPOCH = 1
  6. DISTFILES = g77-openbsd-3.3.6.tgz
  7. CONFIG = ${MACHINE_ARCH}-unknown-openbsd${OSREV}
  8. SUBST_VARS += CONFIG V
  9. SYSV = 4.2.1
  10. SYSLIBPATH = /usr/lib/gcc-lib/${CONFIG}/${SYSV}
  11. LIBDIR = ${PREFIX}/lib/gcc-lib/${CONFIG}/$V
  12. .if ${MACHINE_ARCH} == "m88k"
  13. PKG_ARGS += -DPIC=1
  14. .else
  15. PKG_ARGS += -DPIC=0
  16. .endif
  17. COMMENT = GNU fortran 77 compiler
  18. CATEGORIES = lang math
  19. MASTER_SITES = https://spacehopper.org/mirrors/
  20. PERMIT_PACKAGE_CDROM = Yes
  21. RUN_DEPENDS = devel/libf2c
  22. TEST_DEPENDS = devel/dejagnu \
  23. devel/libf2c
  24. WRKDIST = ${WRKDIR}/g77
  25. CONFIGURE_SCRIPT = ${WRKDIST}/gcc/configure
  26. SEPARATE_BUILD = Yes
  27. LIBIBERTY_INCLUDES = ${WRKDIST}/libiberty/include
  28. GNUCFLAGS = ${CFLAGS} ${COPTS} -DOPENBSD_NATIVE \
  29. -I${LIBIBERTY_INCLUDES}
  30. CONFIGURE_STYLE = gnu
  31. MAKE_FLAGS = CFLAGS="${GNUCFLAGS}" \
  32. CC="${CC}" LDFLAGS="${LDSTATIC}" \
  33. DEMANGLER_PROG= \
  34. DEMANGLE_H= \
  35. LIBIBERTY_INCLUDES=${LIBIBERTY_INCLUDES} \
  36. LIBGCC2_INCLUDES=-I${LIBIBERTY_INCLUDES} \
  37. BUILD_LIBIBERTY=-liberty \
  38. LIBIBERTY=-liberty \
  39. HOST_LIBDEPS= \
  40. LIBDEPS= \
  41. build_infodir=. \
  42. INSTALL_LIBGCC= LIBGCC= \
  43. COMPILERS=f771 \
  44. USE_COLLECT2= \
  45. LANGUAGES=f77
  46. CONFIGURE_ENV = INSTALL_PROGRAM="${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP}" \
  47. CPPFLAGS=-I${LIBIBERTY_INCLUDES}
  48. CONFIGURE_ARGS = --with-gnu-as --with-gnu-ld \
  49. --with-local-prefix=${PREFIX} ${CF} \
  50. --with-gxx-include-dir=dummy \
  51. -enable-languages='f77' \
  52. --disable-cpp --disable-nls \
  53. --enable-__cxa_atexit \
  54. ALL_TARGET = all doc
  55. INSTALL_TARGET = install-common f77.install-info f77.install-normal
  56. post-install:
  57. ln -sf ${SYSLIBPATH}/libgcc.a ${LIBDIR}/libgcc.a
  58. .if ${MACHINE_ARCH} == "m88k"
  59. mkdir ${LIBDIR}/fpic
  60. ln -sf ${SYSLIBPATH}/fpic/libgcc.a ${LIBDIR}/fpic/libgcc.a
  61. mkdir ${LIBDIR}/fPIC
  62. ln -sf ${SYSLIBPATH}/fPIC/libgcc.a ${LIBDIR}/fPIC/libgcc.a
  63. .endif
  64. ln -s ${SYSLIBPATH}/cc1 ${LIBDIR}/cc1
  65. ${INSTALL_MAN} ${WRKBUILD}/f/g77.1 ${PREFIX}/man/man1/g77.1
  66. cd ${PREFIX}/man/man1 && ln -f g77.1 f77.1
  67. cd ${PREFIX}/bin && ln -f g77 f77
  68. WANTLIB = c iberty
  69. pre-test:
  70. ln -sf ${SYSLIBPATH}/libgcc.a ${WRKBUILD}/libgcc.a
  71. ln -s ${SYSLIBPATH}/cc1 ${WRKBUILD}/cc1
  72. .include <bsd.port.mk>