Started the new build system, with full documentation.
This commit is contained in:
parent
70886e4ade
commit
49049beb91
|
@ -0,0 +1,60 @@
|
||||||
|
# 16 october 2015
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# TODO $(CC), $(CXX)? if so, $(LD)?
|
||||||
|
# TODO quotes for the FLAGS options?
|
||||||
|
ARGS = \
|
||||||
|
OS=$(OS) \
|
||||||
|
OUTDIR=$(OUTDIR) \
|
||||||
|
OBJDIR=$(OBJDIR) \
|
||||||
|
CFLAGS=$(CFLAGS) \
|
||||||
|
CXXFLAGS=$(CXXFLAGS) \
|
||||||
|
LDFLAGS=$(LDFLAGS) \
|
||||||
|
NODEBUG=$(NODEBUG) \
|
||||||
|
inlibuibuild=1
|
||||||
|
|
||||||
|
real:
|
||||||
|
@echo $(MAKE)
|
||||||
|
@echo $(ARGS)
|
||||||
|
|
||||||
|
libui:
|
||||||
|
@$(MAKE) -f build/GNUmakefile.libui $(ARGS)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(OBJDIR) $(OUTDIR)
|
||||||
|
|
||||||
|
test: libui
|
||||||
|
@$(MAKE) -f build/GNUmakefile.test $(ARGS)
|
||||||
|
|
||||||
|
# TODO provide a build option for the queuemaintest
|
||||||
|
|
||||||
|
example: libui
|
||||||
|
@$(MAKE) -f build/GNUmakefile.example $(ARGS) EXAMPLE=$(EXAMPLE)
|
||||||
|
|
||||||
|
# TODO examples rule?
|
|
@ -0,0 +1,36 @@
|
||||||
|
HOW TO BUILD
|
||||||
|
Simply type
|
||||||
|
|
||||||
|
make [variables...]
|
||||||
|
|
||||||
|
The build-time settings are
|
||||||
|
|
||||||
|
OS=xxx
|
||||||
|
default operating system
|
||||||
|
supported OSs are
|
||||||
|
windows
|
||||||
|
unix
|
||||||
|
darwin
|
||||||
|
haiku
|
||||||
|
this is autodetected by default
|
||||||
|
CFLAGS=xxx
|
||||||
|
CXXFLAGS=xxx
|
||||||
|
LDFLAGS=xxx
|
||||||
|
compiler flags
|
||||||
|
this is where you can specify -m32 or -m64, for instance
|
||||||
|
Objective-C uses $(CFLAGS)
|
||||||
|
NODEBUG=xxx
|
||||||
|
set to 1 to disable debug symbols
|
||||||
|
must be 1, any other value means "include debug symbols"
|
||||||
|
|
||||||
|
To build the test program use
|
||||||
|
|
||||||
|
make [variables....] test
|
||||||
|
|
||||||
|
The variables are the same as above.
|
||||||
|
|
||||||
|
To build an example, use
|
||||||
|
|
||||||
|
make EXAMPLE=name [variables...] example
|
||||||
|
|
||||||
|
You must specify the example name.
|
|
@ -1,35 +0,0 @@
|
||||||
# 16 october 2015
|
|
||||||
|
|
||||||
# TODO warn on MinGW-w64 builds that lack of isolation awareness means no theming
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
libui:
|
|
||||||
@$(MAKE) -f GNUmakefile.libui OS=$(OS) OUTDIR=$(OUTDIR) OBJDIR=$(OBJDIR) inlibuibuild=1
|
|
||||||
|
|
||||||
# TODO why is this not a regular old rule
|
|
||||||
clean:
|
|
||||||
@$(MAKE) -f GNUmakefile.libui OS=$(OS) OUTDIR=$(OUTDIR) OBJDIR=$(OBJDIR) inlibuibuild=1 clean
|
|
||||||
|
|
||||||
test: libui
|
|
||||||
@$(MAKE) -f GNUmakefile.test OS=$(OS) OUTDIR=$(OUTDIR) OBJDIR=$(OBJDIR) inlibuibuild=1
|
|
Loading…
Reference in New Issue