forked from friendlyarm/matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (25 loc) · 707 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
CROSS_COMPILE ?=
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
RANLIB = $(CROSS_COMPILE)ranlib
export AS LD CC AR NM STRIP OBJCOPY OBJDUMP RANLIB CROSS_COMPILE
SUBDIRS = lib demo
TARGET = subdirs
PHONY += $(TARGET) $(SUBDIRS) %.clean
all: $(TARGET)
subdirs: $(SUBDIRS)
$(SUBDIRS):
$(MAKE) -C $@
%.clean:
@(cd $(patsubst %.clean, %, $@) && $(MAKE) clean)
clean distclean: $(patsubst %, %.clean, $(SUBDIRS))
install:
make -C ./demo install
make -C ./lib install
.PHONY: $(PHONY) install clean distclean