Freetype in Mountain Lion and higher
Henri Gomez
henri.gomez at gmail.com
Wed May 2 09:01:16 PDT 2012
>> ifeq ($(USING_SYSTEM_FT_LIB), false)
>> FREETYPE_LIB =
>> $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
>> endif
>
>
> I'd defer the answer to 2D folks. I can only speculate that this must be a
> minimum required version. Perhaps the makefiles logic might be enhanced in
> this area.
Yep, I spent some time on this makefile and it seems incomplete.
ie :
$(FREETYPE_LIB):
$(CP) $(FREETYPE_LIB_PATH)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX) $@
endif
This goal make me think copy of Freetype library was planned, but need
some more tweaking.
ifeq ($(PLATFORM), windows)
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX)
OTHER_LDLIBS += $(FREETYPE_LIB_PATH)/freetype.lib
else
ifeq ($(USING_SYSTEM_FT_LIB), false)
FREETYPE_LIB = $(LIB_LOCATION)/$(LIB_PREFIX)freetype.$(LIBRARY_SUFFIX).6
endif
OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) -lfreetype
endif
...
#
# Libraries to link, and other C flags.
#
ifeq ($(PLATFORM), macosx))
OTHER_INCLUDES += -I$(X11_PATH)/include
OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX)
ifeq ($(OS_VENDOR),Apple)
# XXXDARWIN Match BSD/Linux behavior -- the mawt.dylib symbols will
# be available at runtime.
OTHER_LDLIBS += -undefined dynamic_lookup
endif
else
ifeq ($(PLATFORM), solaris)
# Note that on Solaris, fontmanager is built against the headless library.
LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/headless
OTHER_LDLIBS += -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt -lc $(LIBM) $(LIBCXX)
else # PLATFORM is linux
OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX)
ifeq ("$(CC_VER_MAJOR)", "3")
OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
endif
endif
endif
Makefile may need some cleanup to split it between using system FT lib
and copying (embedding) provided external FT LIB (via
ALT_FREETYPE_HEADERS_PATH and ALT_FREETYPE_LIB_PATH)
It will be clearer by using 2 vars.
One exist, USING_SYSTEM_FT_LIB, new one could be EMBEDDING_EXTERNAL_FT_LIB.
My 0.01$
More information about the macosx-port-dev
mailing list