-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile.rtems
76 lines (60 loc) · 1.53 KB
/
Makefile.rtems
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_MAKEFILE_PATH)/make/target.cfg
INSTALL_BASE = $(RTEMS_MAKEFILE_PATH)/lib
BUILDDIR = build-$(RTEMS_BSP)
CPPFLAGS += -I. -Idirect -Idirect/rtems
DEPFLAGS = -MT $@ -MD -MP -MF $(basename $@).d
GCCFLAGS = -g -I . -B $(INSTALL_BASE) -specs bsp_specs -qrtems
CFLAGS += $(DEPFLAGS) $(GCCFLAGS)
INCLUDES = rtems/rtems_yaffs.h \
direct/yportenv.h \
direct/ydirectenv.h \
direct/yaffs_osglue.h \
direct/yaffs_hweight.h \
direct/yaffscfg.h \
direct/yaffs_list.h \
direct/yaffsfs.h \
yaffs_guts.h \
yaffs_packedtags2.h \
yaffs_ecc.h
LIB = $(BUILDDIR)/libyaffs2.a
LIB_PIECES = yaffs_ecc \
yaffs_guts \
yaffs_packedtags1 \
yaffs_tagscompat \
yaffs_packedtags2 \
yaffs_nand \
yaffs_checkptrw \
direct/yaffs_qsort \
yaffs_nameval \
yaffs_attribs \
yaffs_allocator \
yaffs_bitmap \
yaffs_yaffs1 \
yaffs_yaffs2 \
yaffs_verify \
yaffs_summary \
direct/yaffs_hweight \
rtems/rtems_yaffs \
rtems/rtems_yaffs_os_context \
rtems/rtems_yaffs_os_glue
LIB_OBJS = $(LIB_PIECES:%=$(BUILDDIR)/%.o)
LIB_DEPS = $(LIB_PIECES:%=$(BUILDDIR)/%.d)
all: $(BUILDDIR) $(LIB)
$(BUILDDIR):
mkdir $(BUILDDIR)
mkdir $(BUILDDIR)/direct
mkdir $(BUILDDIR)/rtems
$(LIB): $(LIB_OBJS)
$(AR) rcu $@ $^
$(RANLIB) $@
$(BUILDDIR)/%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
clean:
rm -rf $(BUILDDIR)
install: all
mkdir -p $(INSTALL_BASE)/include/yaffs
install -m 644 -t $(INSTALL_BASE) $(LIB)
install -m 644 -t $(INSTALL_BASE)/include/yaffs $(INCLUDES)
.PHONY: clean install
-include $(LIB_DEPS)