Re-established the test build.

This commit is contained in:
Pietro Gagliardi 2015-12-11 20:04:31 -05:00
parent e390730e6f
commit 3e0b6fdff4
5 changed files with 29 additions and 21 deletions

View File

@ -1,5 +1,7 @@
# 16 october 2015
# TODO the loader looks for the soname, not the base name, which is frustrating
# Global flags.
CFLAGS += \

25
build/GNUmakefile.test Normal file
View File

@ -0,0 +1,25 @@
# 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
LDFLAGS += -Wl,-rpath='$$ORIGIN'
else
# TODO is there an equivalent to -L?
LDFLAGS += $(OUTDIR)/libui.lib
endif
include build/GNUbase$(TOOLCHAIN).mk

View File

@ -34,3 +34,5 @@ To build an example, use
make EXAMPLE=name [variables...] example
You must specify the example name.
TODO discuss the internals

View File

@ -1,21 +0,0 @@
# 16 october 2015
ifndef inlibuibuild
$(error [FAIL] do not run these makefiles directly)
endif
include $(OS)/GNUosspecific.mk
include test/GNUmakeinc.mk
HFILES += \
ui.h
NAME = test
SUFFIX = $(EXESUFFIX)
# TODO what's the difference between doing this and linking to out/libui.so directly?
# LDFLAGS += -L$(OUTDIR) -lui
LDFLAGS += $(OUTDIR)/libui$(LIBSUFFIX)
include GNUbaserules.mk