1. PureLang
  2. Untitled project
  3. pure-lang

Commits

Albert Graef  committed 111097b

Add missing linker flags.

  • Participants
  • Parent commits 77cba4e
  • Branches default

Comments (0)

Files changed (1)

File pure-gtk/Makefile

View file
 
 # Take care of some common systems.
 ifneq "$(findstring -linux,$(host))" ""
-# Some newer Linux systems make --as-needed the default, we need the old
-# behaviour here.
+# Some newer Linux systems make --as-needed the default, we need the
+# old behaviour here. NOTE: This seems to be broken with recent gcc
+# versions, so you may have to link batch-compiled pure-gtk scripts
+# against the required GTK+ libraries anyway. :(
 EXTRA_LD_FLAGS = -Wl,--no-as-needed
 endif
 ifneq "$(findstring -mingw,$(host))" ""
 
 # Compile the examples.
 
+# NOTE: Recent gcc versions require that we link in the GTK+ libs when
+# batch-compiling these programs.
+EXTRA_LD_LIBS = $(shell pkg-config --libs gtk+-2.0)
+
 examples: $(examples)
 
 examples/%: examples/%.pure
-	(cd examples && pure $(PURE_COPTS) -c $(notdir $<) -o $(notdir $@))
+	(cd examples && pure $(PURE_COPTS) -c $(notdir $<) -o $(notdir $@) $(EXTRA_LD_LIBS))
 
 # Install targets.