2015-12-11 17:28:07 -06:00
|
|
|
# 16 october 2015
|
|
|
|
|
|
|
|
ifndef inlibuibuild
|
|
|
|
$(error Do not run these makefiles directly.)
|
|
|
|
endif
|
|
|
|
|
|
|
|
# for GCC
|
2016-01-05 10:51:36 -06:00
|
|
|
SOVERSION0 = 0
|
|
|
|
SOVERSIONA = A
|
2015-12-11 17:28:07 -06:00
|
|
|
|
|
|
|
include $(OS)/GNUosspecific.mk
|
|
|
|
include common/GNUfiles.mk
|
|
|
|
include $(OS)/GNUfiles.mk
|
|
|
|
|
|
|
|
HFILES += \
|
|
|
|
ui.h \
|
|
|
|
ui_$(OS)$(OSHSUFFIX)
|
|
|
|
|
|
|
|
NAME = libui
|
|
|
|
SUFFIX = $(LIBSUFFIX)
|
2016-01-05 10:51:36 -06:00
|
|
|
ifeq ($(USESSONAME),1)
|
|
|
|
SUFFIX = $(SONAMEEXT)
|
|
|
|
endif
|
2015-12-11 17:28:07 -06:00
|
|
|
|
|
|
|
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
|
2015-12-11 18:49:14 -06:00
|
|
|
# make every symbol hidden by default except _UI_EXTERN ones
|
|
|
|
# TODO autogenerate a .def file?
|
|
|
|
CFLAGS += \
|
2016-01-20 02:14:49 -06:00
|
|
|
-D "_UI_EXTERN=__declspec(dllexport) extern"
|
2015-12-11 18:49:14 -06:00
|
|
|
CXXFLAGS += \
|
2016-01-20 02:14:49 -06:00
|
|
|
-D "_UI_EXTERN=__declspec(dllexport) extern"
|
2015-12-11 17:28:07 -06:00
|
|
|
endif
|
|
|
|
|
2016-01-05 10:51:36 -06:00
|
|
|
ifeq ($(USESSONAME),1)
|
|
|
|
LDFLAGS += $(SONAMEFLAG)$(NAME)$(SUFFIX)
|
|
|
|
endif
|
|
|
|
|
2015-12-11 17:28:07 -06:00
|
|
|
include build/GNUbase$(TOOLCHAIN).mk
|
2016-01-01 16:19:14 -06:00
|
|
|
|
|
|
|
# install rule is OS specific
|
2016-01-04 14:52:39 -06:00
|
|
|
# TODO probably better off making it a toolchain-wide rule
|
2016-01-01 16:19:14 -06:00
|
|
|
include $(OS)/GNUinstall.mk
|