36 lines
700 B
Plaintext
36 lines
700 B
Plaintext
# 16 october 2015
|
|
|
|
ifndef inlibuibuild
|
|
$(error Do not run these makefiles directly.)
|
|
endif
|
|
ifndef EXAMPLE
|
|
$(error You must specify an example to build by adding EXAMPLE=name to the command line.)
|
|
endif
|
|
|
|
include $(OS)/GNUosspecific.mk
|
|
|
|
CFILES += \
|
|
examples/$(EXAMPLE)/main.c
|
|
|
|
HFILES += \
|
|
ui.h
|
|
|
|
NAME = $(EXAMPLE)
|
|
SUFFIX = $(EXESUFFIX)
|
|
|
|
# TODO merge with the one in build/GNUmakefile.test
|
|
ifeq ($(TOOLCHAIN),gcc)
|
|
LDFLAGS += -L$(OUTDIR) -lui
|
|
# see build/GNUmakefile.test
|
|
ifeq ($(OS),darwin)
|
|
LDFLAGS += -Wl,-rpath,@executable_path
|
|
else
|
|
LDFLAGS += -Wl,-rpath,'$$ORIGIN'
|
|
endif
|
|
else
|
|
# TODO is there an equivalent to -L?
|
|
LDFLAGS += $(OUTDIR)/libui.lib
|
|
endif
|
|
|
|
include build/GNUbase$(TOOLCHAIN).mk
|