# 16 october 2015 ifndef inlibuibuild $(error Do not run these makefiles directly.) endif # for GCC SOVERSION0 = 0 SOVERSIONA = A include $(OS)/GNUosspecific.mk include common/GNUfiles.mk include $(OS)/GNUfiles.mk HFILES += \ ui.h \ ui_$(OS)$(OSHSUFFIX) NAME = libui SUFFIX = $(LIBSUFFIX) ifeq ($(USESSONAME),1) SUFFIX = $(SONAMEEXT) endif ifeq ($(TOOLCHAIN),gcc) # make every symbol hidden by default except _UI_EXTERN ones # thanks ebassi in irc.gimp.net/#gtk+ CFLAGS += \ -D_UI_EXTERN='__attribute__((visibility("default"))) extern' \ -fvisibility=hidden CXXFLAGS += \ -D_UI_EXTERN='__attribute__((visibility("default"))) extern' \ -fvisibility=hidden LDFLAGS += \ -fvisibility=hidden else # make every symbol hidden by default except _UI_EXTERN ones # TODO autogenerate a .def file? CFLAGS += \ -D "_UI_EXTERN=__declspec(dllexport) extern" CXXFLAGS += \ -D "_UI_EXTERN=__declspec(dllexport) extern" endif ifeq ($(USESSONAME),1) LDFLAGS += $(SONAMEFLAG)$(NAME)$(SUFFIX) endif include build/GNUbase$(TOOLCHAIN).mk # install rule is OS specific # TODO probably better off making it a toolchain-wide rule include $(OS)/GNUinstall.mk