libui/build/GNUmakefile.test

50 lines
1.1 KiB
Plaintext

# 16 october 2015
ifndef inlibuibuild
$(error Do not run these makefiles directly.)
endif
include $(OS)/GNUosspecific.mk
include test/GNUfiles.mk
HFILES += \
ui.h
NAME = test
SUFFIX = $(EXESUFFIX)
ifeq ($(OS),windows)
ifneq (,$(STATIC))
RCFLAGS += -D _UI_STATIC
endif
endif
ifeq ($(TOOLCHAIN),gcc)
ifeq (,$(STATIC))
LDFLAGS += -L$(OUTDIR) -lui
else
LDFLAGS += -L$(OUTDIR) -lui $(NATIVE_UI_LDFLAGS)
endif
# tell the dynamic loader to search in the executable path for shared objects
# note: OS X's linker complains if we say -rpath= instead of -rpath,
# also note that OS X doesn't use $ORIGIN - see http://jorgen.tjer.no/post/2014/05/20/dt-rpath-ld-and-at-rpath-dyld/
# the extra slash is needed on OS X 10.7; have it around just to be correct
ifeq ($(OS),darwin)
LDFLAGS += -Wl,-rpath,@executable_path/
else
LDFLAGS += -Wl,-rpath,'$$ORIGIN'
endif
else
ifeq (,$(STATIC))
# TODO is there an equivalent to -L?
LDFLAGS += $(OUTDIR)/libui.lib
else
LDFLAGS += $(OUTDIR)/libui.lib $(OUTDIR)/libui.res $(OUTDIR)/$(NAME).res $(NATIVE_UI_LDFLAGS)
endif
endif
# executables are not shared libraries
USESSONAME = 0
include build/GNUbase$(TOOLCHAIN).mk