File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ # !/usr/bin/env make
2+ SH ?= sh
3+ uname_S := $(shell $(SH ) -c 'uname -s || echo system')
4+ uname_R := $(shell $(SH ) -c 'uname -r | cut -d- -f1 || echo release')
5+ uname_M := $(shell $(SH ) -c 'uname -m || echo cpu')
6+ FLAVOR ?= optimize
7+
8+ platformdir ?= $(uname_S ) -$(uname_R ) -$(uname_M ) -$(FLAVOR )
9+ builddir ?= $(CURDIR ) /build/$(platformdir )
10+
11+ prefix ?= $(CURDIR ) /$(platformdir )
12+ # DESTDIR =
13+
14+ CMAKE_FLAGS ?= -DCMAKE_INSTALL_PREFIX=$(prefix )
15+
16+ # The default target in this Makefile is...
17+ all ::
18+
19+ install : all
20+ $(MAKE ) -C $(builddir ) DESTDIR=$(DESTDIR ) install
21+
22+ $(builddir ) /stamp : $(CMAKE_FILES )
23+ mkdir -p $(builddir )
24+ cd $(builddir ) && cmake $(CMAKE_FLAGS ) ../..
25+ touch $@
26+
27+ all :: $(builddir ) /stamp
28+ $(MAKE ) -C $(builddir ) $(MAKEARGS ) all
29+
30+ clean : $(builddir ) /stamp
31+ $(MAKE ) -C $(builddir ) $(MAKEARGS ) clean
32+
33+ .PHONY : all
34+ .PHONY : clean
35+ .PHONY : install
You can’t perform that action at this time.
0 commit comments