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
|
2016-05-14 10:12:45 -05:00
|
|
|
ifndef RELEASE
|
|
|
|
RELEASE = 0
|
2015-12-10 18:08:26 -06:00
|
|
|
endif
|
|
|
|
|
2015-12-11 17:28:07 -06:00
|
|
|
# parameters
|
|
|
|
export OS
|
2016-01-19 15:40:00 -06:00
|
|
|
# TODO CC, CXX, RC, LD
|
2015-12-11 17:28:07 -06:00
|
|
|
export CFLAGS
|
|
|
|
export CXXFLAGS
|
2016-01-19 15:40:00 -06:00
|
|
|
# TODO RCFLAGS
|
2015-12-11 17:28:07 -06:00
|
|
|
export LDFLAGS
|
2016-05-14 10:12:45 -05:00
|
|
|
export RELEASE
|
2015-12-11 17:28:07 -06:00
|
|
|
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-06 18:38:27 -06:00
|
|
|
@$(MAKE) -f GNUmakefile example EXAMPLE=controlgallery
|
2016-01-04 14:52:39 -06:00
|
|
|
@$(MAKE) -f GNUmakefile example EXAMPLE=histogram
|
2016-05-12 11:50:05 -05:00
|
|
|
@$(MAKE) -f GNUmakefile example EXAMPLE=cpp-multithread
|
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
|