Various fixes around makefiles
* $PREFIX is uppercase (I have no idea why I put it lowercase before). * "install" rules is OS specific and moved to new OS specific files. So that they can be included last. * "examples" rule defines the list of examples to execute. * Travis launches the "test" rule.
This commit is contained in:
parent
3152ff0512
commit
c204e47b72
|
@ -7,10 +7,5 @@ script:
|
|||
- sudo apt-get update
|
||||
- sudo apt-get install libgtk-3-dev -y || sudo apt-cache search libgtk3
|
||||
- make -f GNUmakefile
|
||||
- make -f GNUmakefile example EXAMPLE=histogram
|
||||
|
||||
# Only working things are added here... Some interesting commands would be:
|
||||
# - make -f GNUmakefile examples
|
||||
# - make -f GNUmakefile test
|
||||
#
|
||||
# But they both won't work
|
||||
- make -f GNUmakefile examples
|
||||
- make -f GNUmakefile test
|
||||
|
|
15
GNUmakefile
15
GNUmakefile
|
@ -8,11 +8,6 @@ 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
|
||||
|
@ -64,12 +59,10 @@ example: libui
|
|||
|
||||
# TODO examples rule? --> That's it right ?
|
||||
examples:
|
||||
for d in $$(ls examples); do $(MAKE) -f GNUmakefile example EXAMPLE=$$d ; done
|
||||
@$(MAKE) -f GNUmakefile example EXAMPLE=histogram
|
||||
#@$(MAKE) -f GNUmakefile example EXAMPLE=controlgallery
|
||||
|
||||
.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
|
||||
|
||||
install:
|
||||
@$(MAKE) -f build/GNUmakefile.libui install inlibuibuild=1
|
||||
|
|
|
@ -39,3 +39,6 @@ else
|
|||
endif
|
||||
|
||||
include build/GNUbase$(TOOLCHAIN).mk
|
||||
|
||||
# install rule is OS specific
|
||||
include $(OS)/GNUinstall.mk
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
ifndef PREFIX
|
||||
PREFIX=/usr
|
||||
endif
|
||||
|
||||
# Incorrect for Mac Os X, this should be easy to fix
|
||||
install: $(OUT)
|
||||
cp $(OUT) $(DESTDIR)$(PREFIX)/lib/libui.0.dylib
|
||||
ln -s libui.so.0 $(DESTDIR)$(PREFIX)/lib/libui.so
|
||||
cp ui.h ui_$(OS).h $(DESTDIR)$(PREFIX)/include/
|
|
@ -0,0 +1,8 @@
|
|||
ifndef PREFIX
|
||||
PREFIX=/usr
|
||||
endif
|
||||
|
||||
install: $(OUT)
|
||||
cp $(OUT) $(DESTDIR)$(PREFIX)/lib/libui.so.0
|
||||
ln -fs libui.so.0 $(DESTDIR)$(PREFIX)/lib/libui.so
|
||||
cp ui.h ui_$(OS).h $(DESTDIR)$(PREFIX)/include/
|
|
@ -0,0 +1,3 @@
|
|||
install:
|
||||
@echo "No install for windows !"
|
||||
@exit 1
|
Loading…
Reference in New Issue