Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: m-labs/misp
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3e1bd2e
Choose a base ref
...
head repository: m-labs/misp
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a16f552
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on May 31, 2012

  1. Use new common.mak canned recipe

    Sebastien Bourdeauducq committed May 31, 2012
    Copy the full SHA
    09e96c4 View commit details
  2. Basic YAFFS2 lib

    Sebastien Bourdeauducq committed May 31, 2012
    Copy the full SHA
    224f754 View commit details
  3. Makefile: factorize lib code and add YAFFS2

    Sebastien Bourdeauducq committed May 31, 2012
    Copy the full SHA
    a16f552 View commit details
Showing with 49 additions and 13 deletions.
  1. +12 −10 Makefile
  2. +3 −1 libglue/Makefile
  3. +3 −1 liblua/Makefile
  4. +3 −1 libm/Makefile
  5. +28 −0 libyaffs2/Makefile
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ MISPDIR=.
include $(MISPDIR)/common.mak

OBJECTS=crt0.o isr.o luainit.o main.o
OURLIBS=m yaffs2 glue lua

CFLAGS+=-I$(MISPDIR)/libm/include -I$(LUADIR)/src

@@ -20,21 +21,22 @@ misp.elf: linker.ld $(OBJECTS) libs
$(LD) $(LDFLAGS) -T $< -N -o $@ $(OBJECTS) \
-L$(M2DIR)/software/libbase \
-L$(CRTDIR) \
-L$(MISPDIR)/libm \
-L$(MISPDIR)/libglue \
-L$(MISPDIR)/liblua \
--start-group -lbase -lcompiler_rt -lm -lglue -llua --end-group
$(addprefix -L$(MISPDIR)/lib,$(OURLIBS)) \
--start-group -lbase -lcompiler_rt $(addprefix -l,$(OURLIBS)) --end-group
chmod -x $@

%.o: %.c
$(compile-dep)

libs:
make -C $(MISPDIR)/libm
make -C $(MISPDIR)/libglue
make -C $(MISPDIR)/liblua
for lib in $(OURLIBS); do \
make -C $(MISPDIR)/lib$$lib; \
done

clean:
rm -f $(OBJECTS) $(OBJECTS:.o=.d) misp.elf misp.bin .*~ *~
make -C $(MISPDIR)/libm clean
make -C $(MISPDIR)/libglue clean
make -C $(MISPDIR)/liblua clean
for lib in $(OURLIBS); do \
make -C $(MISPDIR)/lib$$lib clean; \
done

.PHONY: clean libs flash
4 changes: 3 additions & 1 deletion libglue/Makefile
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@ include $(MISPDIR)/common.mak

OBJECTS=file.o getenv.o


all: libglue.a

# pull in dependency info for *existing* .o files
@@ -13,6 +12,9 @@ libglue.a: $(OBJECTS)
$(AR) clr libglue.a $(OBJECTS)
$(RANLIB) libglue.a

%.o: %.c
$(compile-dep)

.PHONY: clean

clean:
4 changes: 3 additions & 1 deletion liblua/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
MISPDIR=..
SRCDIR=$(LUADIR)/src/
include $(MISPDIR)/common.mak

CFLAGS+=-I. -DLUA_IEEEENDIAN=1 -Dstrcoll=strcmp
@@ -18,6 +17,9 @@ liblua.a: $(OBJECTS)
$(AR) clr liblua.a $(OBJECTS)
$(RANLIB) liblua.a

%.o: $(LUADIR)/src/%.c
$(compile-dep)

.PHONY: clean

clean:
4 changes: 3 additions & 1 deletion libm/Makefile
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ e_cosh.o e_jn.o e_scalb.o s_asinh.o s_fabs.o s_log1p.o
e_exp.o e_lgamma.o e_sinh.o s_atan.o s_finite.o s_logb.o s_sin.o w_cosh.o w_jn.o w_sinh.o \
e_fmod.o e_lgamma_r.o e_sqrt.o s_cbrt.o s_floor.o s_matherr.o s_tan.o w_exp.o w_lgamma.o w_sqrt.o


all: libm.a

# pull in dependency info for *existing* .o files
@@ -23,6 +22,9 @@ libm.a: $(OBJECTS)
$(AR) clr libm.a $(OBJECTS)
$(RANLIB) libm.a

%.o: %.c
$(compile-dep)

.PHONY: clean

clean:
28 changes: 28 additions & 0 deletions libyaffs2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
MISPDIR=..
include $(MISPDIR)/common.mak

CFLAGS+=-include $(YAFFSDIR)/direct/yportenv.h -I$(YAFFSDIR)/direct -I$(YAFFSDIR)
CFLAGS+=-DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_DEFINES_TYPES -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES

OBJECTS=yaffs_ecc.o yaffs_guts.o yaffs_packedtags1.o yaffs_tagscompat.o yaffs_packedtags2.o yaffs_nand.o yaffs_checkptrw.o yaffs_nameval.o yaffs_attribs.o yaffs_allocator.o yaffs_bitmap.o yaffs_yaffs1.o yaffs_yaffs2.o yaffs_verify.o yaffs_summary.o
OBJECTS+=yaffs_hweight.o yaffs_qsort.o

all: libyaffs2.a

# pull in dependency info for *existing* .o files
-include $(OBJECTS:.o=.d)

libyaffs2.a: $(OBJECTS)
$(AR) clr libyaffs2.a $(OBJECTS)
$(RANLIB) libyaffs2.a

%.o: $(YAFFSDIR)/%.c
$(compile-dep)

%.o: $(YAFFSDIR)/direct/%.c
$(compile-dep)

.PHONY: clean

clean:
rm -f $(OBJECTS) $(OBJECTS:.o=.d) libyaffs2.a .*~ *~