libui/build/GNUmakefile.test

36 lines
850 B
Plaintext
Raw Normal View History

2015-12-11 19:04:31 -06:00
# 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 ($(TOOLCHAIN),gcc)
LDFLAGS += -L$(OUTDIR) -lui
# tell the dynamic loader to search in the executable path for shared objects
2015-12-13 01:28:51 -06:00
# note: OS X's linker complains if we say -rpath= instead of -rpath,
2015-12-19 15:46:04 -06:00
# 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/
2016-05-14 22:44:07 -05:00
# the extra slash is needed on OS X 10.7
2015-12-19 15:46:04 -06:00
ifeq ($(OS),darwin)
2016-05-14 22:44:07 -05:00
LDFLAGS += -Wl,-rpath,@executable_path/
2015-12-19 15:46:04 -06:00
else
LDFLAGS += -Wl,-rpath,'$$ORIGIN'
endif
2015-12-11 19:04:31 -06:00
else
# TODO is there an equivalent to -L?
LDFLAGS += $(OUTDIR)/libui.lib
endif
# executables are not shared libraries
USESSONAME = 0
2015-12-11 19:04:31 -06:00
include build/GNUbase$(TOOLCHAIN).mk