forked from wdas/partio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (30 loc) · 889 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env make
SH ?= sh
uname_S := $(shell $(SH) -c 'uname -s || echo kernel')
uname_R := $(shell $(SH) -c 'uname -r | cut -d- -f1 || echo release')
uname_M := $(shell $(SH) -c 'uname -m || echo machine')
FLAVOR ?= optimize
platformdir ?= $(uname_S)-$(uname_R)-$(uname_M)-$(FLAVOR)
builddir ?= $(CURDIR)/build/$(platformdir)
prefix ?= $(CURDIR)/$(platformdir)
#DESTDIR =
ifdef V
VERBOSE=1
export VERBOSE
endif
CMAKE_FLAGS ?= -DCMAKE_INSTALL_PREFIX=$(prefix)
ifdef RP_SeExpr
CMAKE_FLAGS += -DSEEXPR_BASE=$(RP_SeExpr)
endif
# The default target in this Makefile is...
all::
install: all
$(MAKE) -C $(builddir) DESTDIR=$(DESTDIR) install
$(builddir)/stamp:
mkdir -p $(builddir)
cd $(builddir) && cmake $(CMAKE_FLAGS) ../..
touch $@
all:: $(builddir)/stamp
$(MAKE) -C $(builddir) $(MAKEARGS) all
clean: $(builddir)/stamp
$(MAKE) -C $(builddir) $(MAKEARGS) clean