ELIBSDIR :=
ELIBS := Reve
-PACKBLIBS := $(ROOTCLIBS) -lTreePlayer -lGeomPainter -lGed -lRGL $(SYSLIBS)
+PACKBLIBS := $(ROOTCLIBS) -lTreePlayer -lGeomPainter -lGed \
+ -L$(shell root-config --libdir)/$(dir $(shell root-config --version)) -lFTGL -lRGL \
+ $(SYSLIBS)
+
+ifeq (macosx,$(ALICE_TARGET))
+
+# On Mac OS X gcc we need GL and GLU
+ELIBS+=GL GLU
+ELIBSDIR+=/usr/X11R6/lib/
+endif