libui/build/GNUmakefile.libui

42 lines
911 B
Plaintext
Raw Normal View History

# 16 october 2015
ifndef inlibuibuild
$(error Do not run these makefiles directly.)
endif
# for GCC
SOVERSION = 0
include $(OS)/GNUosspecific.mk
include common/GNUfiles.mk
include $(OS)/GNUfiles.mk
HFILES += \
ui.h \
ui_$(OS)$(OSHSUFFIX)
NAME = libui
SUFFIX = $(LIBSUFFIX)
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
include build/GNUbase$(TOOLCHAIN).mk