Makefile: Added examples + install rules.

This commit is contained in:
Florent Clairambault 2016-01-01 01:42:54 +01:00
parent 6a5997cc1a
commit b795cda79e
1 changed files with 16 additions and 1 deletions

View File

@ -8,6 +8,11 @@ MAKEFLAGS += --no-print-directory
OUTDIR = out
OBJDIR = .obj
# default install prefix is /usr
ifndef prefix
prefix=/usr
endif
# MAME does this so :/
ifeq ($(OS),Windows_NT)
OS = windows
@ -57,4 +62,14 @@ test: libui
example: libui
@$(MAKE) -f build/GNUmakefile.example inlibuibuild=1
# TODO examples rule?
# TODO examples rule? --> That's it right ?
examples:
for d in $$(ls examples); do $(MAKE) -f GNUmakefile example EXAMPLE=$$d ; done
.PHONY: examples
install: libui
cp out/libui.so $(DESTDIR)$(prefix)/lib/libui.so.0
ln -s libui.so.0 $(DESTDIR)$(prefix)/lib/libui.so
cp ui.h ui_unix.h $(DESTDIR)$(prefix)/include/ui.h