2015-12-10 18:08:26 -06:00
|
|
|
# 16 october 2015
|
|
|
|
|
2015-12-10 18:22:16 -06:00
|
|
|
# TODO http://stackoverflow.com/questions/4122831/disable-make-builtin-rules-and-variables-from-inside-the-make-file
|
|
|
|
|
2015-12-10 18:08:26 -06:00
|
|
|
# silence entering/leaving messages
|
|
|
|
MAKEFLAGS += --no-print-directory
|
|
|
|
|
|
|
|
OUTDIR = out
|
|
|
|
OBJDIR = .obj
|
|
|
|
|
|
|
|
# MAME does this so :/
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
OS = windows
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef OS
|
|
|
|
UNAME = $(shell uname -s)
|
|
|
|
ifeq ($(UNAME),Darwin)
|
|
|
|
OS = darwin
|
|
|
|
else ifeq ($(UNAME),Haiku)
|
|
|
|
OS = haiku
|
|
|
|
else
|
|
|
|
OS = unix
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
# default is to build with debug symbols
|
|
|
|
ifndef NODEBUG
|
|
|
|
NODEBUG = 0
|
|
|
|
endif
|
|
|
|
|
2015-12-11 17:28:07 -06:00
|
|
|
# parameters
|
|
|
|
export OS
|
|
|
|
# TODO CC, CXX, RC, CVTRES, LD
|
|
|
|
export CFLAGS
|
|
|
|
export CXXFLAGS
|
|
|
|
# TODO RCFLAGS, CVTRESFLAGS
|
|
|
|
export LDFLAGS
|
|
|
|
export NODEBUG
|
|
|
|
export EXAMPLE
|
2016-01-04 14:52:39 -06:00
|
|
|
export PREFIX
|
|
|
|
|
|
|
|
# for Debian - see https://github.com/andlabs/libui/pull/10
|
|
|
|
export DESTDIR
|
2015-12-10 18:08:26 -06:00
|
|
|
|
2015-12-11 17:28:07 -06:00
|
|
|
# other important variables
|
|
|
|
export OBJDIR
|
|
|
|
export OUTDIR
|
2015-12-10 18:08:26 -06:00
|
|
|
|
|
|
|
libui:
|
2015-12-11 17:28:07 -06:00
|
|
|
@$(MAKE) -f build/GNUmakefile.libui inlibuibuild=1
|
2015-12-10 18:08:26 -06:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf $(OBJDIR) $(OUTDIR)
|
|
|
|
|
|
|
|
test: libui
|
2015-12-11 17:28:07 -06:00
|
|
|
@$(MAKE) -f build/GNUmakefile.test inlibuibuild=1
|
2015-12-10 18:08:26 -06:00
|
|
|
|
|
|
|
# TODO provide a build option for the queuemaintest
|
|
|
|
|
|
|
|
example: libui
|
2015-12-11 17:28:07 -06:00
|
|
|
@$(MAKE) -f build/GNUmakefile.example inlibuibuild=1
|
2015-12-10 18:08:26 -06:00
|
|
|
|
2015-12-31 18:42:54 -06:00
|
|
|
examples:
|
2016-01-01 16:19:14 -06:00
|
|
|
#@$(MAKE) -f GNUmakefile example EXAMPLE=controlgallery
|
2016-01-04 14:52:39 -06:00
|
|
|
@$(MAKE) -f GNUmakefile example EXAMPLE=histogram
|
2015-12-31 18:42:54 -06:00
|
|
|
|
|
|
|
.PHONY: examples
|
|
|
|
|
2016-01-01 16:19:14 -06:00
|
|
|
install:
|
|
|
|
@$(MAKE) -f build/GNUmakefile.libui install inlibuibuild=1
|