Print this page
OS-2559 illumos-extra should provide native node in proto.strap


  28 
  29 NODE_ROOT =     $(DESTDIR)/usr/node/$(MAJOR_VER)
  30 VERSIONJS =     $(NODE_ROOT)/node_modules/platform_node_version.js
  31 
  32 CFLAGS +=       -Wno-unknown-pragmas
  33 
  34 #
  35 # Node's build system is super broken.  If we pass it LIBS at configure time,
  36 # it ignores it.  If we pass it LIBS at make time, it completely replaces all
  37 # libraries, including those the build system itself would normally add.
  38 # So our only option is to add this to LDFLAGS, which has to be passed at
  39 # build time... including for the install target, because the generated
  40 # makefiles have missing dependencies and rebuild stuff when installing.
  41 # This has to be the most complicated, baroque, pointlessly wrong way
  42 # imaginable to build something with a few dozen source files.  The next time
  43 # you are here reading this and trying to work around the next piece of
  44 # Node build stupidity, just stop.  Rip all this out, write a simple makefile,
  45 # and copy it in at unpack time like we do for bzip2.
  46 #
  47 LDFLAGS +=      -lumem




  48 
  49 AUTOCONF_OPTS += \
  50         --with-dtrace \
  51         --openssl-use-sys \
  52         --openssl-libpath=$(DESTDIR)/lib \
  53         --openssl-includes=$(DESTDIR)/usr/include \
  54         --shared-openssl-libname=sunw_crypto,sunw_ssl \
  55         --shared-zlib \
  56         --shared-zlib-libpath=$(DESTDIR)/lib \
  57         --shared-zlib-includes=$(DESTDIR)/usr/include \
  58         --prefix=/usr/node/$(MAJOR_VER)
  59 
  60 AUTOCONF_CFLAGS =       CFLAGS="$(CPPFLAGS) $(CFLAGS)"
  61 AUTOCONF_LIBS =
  62 AUTOCONF_ENV +=         CXXFLAGS="$(CPPFLAGS) $(CFLAGS)"
  63 
  64 #
  65 # Jump through hoops to get the locally-run build tools to build with the
  66 # correct compiler and without referencing anything in the proto area.
  67 # This is needed because the proto area may contain libraries that are not




  28 
  29 NODE_ROOT =     $(DESTDIR)/usr/node/$(MAJOR_VER)
  30 VERSIONJS =     $(NODE_ROOT)/node_modules/platform_node_version.js
  31 
  32 CFLAGS +=       -Wno-unknown-pragmas
  33 
  34 #
  35 # Node's build system is super broken.  If we pass it LIBS at configure time,
  36 # it ignores it.  If we pass it LIBS at make time, it completely replaces all
  37 # libraries, including those the build system itself would normally add.
  38 # So our only option is to add this to LDFLAGS, which has to be passed at
  39 # build time... including for the install target, because the generated
  40 # makefiles have missing dependencies and rebuild stuff when installing.
  41 # This has to be the most complicated, baroque, pointlessly wrong way
  42 # imaginable to build something with a few dozen source files.  The next time
  43 # you are here reading this and trying to work around the next piece of
  44 # Node build stupidity, just stop.  Rip all this out, write a simple makefile,
  45 # and copy it in at unpack time like we do for bzip2.
  46 #
  47 LDFLAGS +=      -lumem
  48 
  49 ifeq ($(STRAP),strap)
  50         LDFLAGS += $(SYSLIBDIRS:%=-R$(DESTDIR)/%)
  51 endif
  52 
  53 AUTOCONF_OPTS += \
  54         --with-dtrace \
  55         --openssl-use-sys \
  56         --openssl-libpath=$(DESTDIR)/lib \
  57         --openssl-includes=$(DESTDIR)/usr/include \
  58         --shared-openssl-libname=sunw_crypto,sunw_ssl \
  59         --shared-zlib \
  60         --shared-zlib-libpath=$(DESTDIR)/lib \
  61         --shared-zlib-includes=$(DESTDIR)/usr/include \
  62         --prefix=/usr/node/$(MAJOR_VER)
  63 
  64 AUTOCONF_CFLAGS =       CFLAGS="$(CPPFLAGS) $(CFLAGS)"
  65 AUTOCONF_LIBS =
  66 AUTOCONF_ENV +=         CXXFLAGS="$(CPPFLAGS) $(CFLAGS)"
  67 
  68 #
  69 # Jump through hoops to get the locally-run build tools to build with the
  70 # correct compiler and without referencing anything in the proto area.
  71 # This is needed because the proto area may contain libraries that are not