Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 5 files changed
  • 0 comments
  • 1 contributor
22  Makefile
@@ -2,6 +2,7 @@ MISPDIR=.
2 2
 include $(MISPDIR)/common.mak
3 3
 
4 4
 OBJECTS=crt0.o isr.o luainit.o main.o
  5
+OURLIBS=m yaffs2 glue lua
5 6
 
6 7
 CFLAGS+=-I$(MISPDIR)/libm/include -I$(LUADIR)/src
7 8
 
@@ -20,21 +21,22 @@ misp.elf: linker.ld $(OBJECTS) libs
20 21
 	$(LD) $(LDFLAGS) -T $< -N -o $@ $(OBJECTS) \
21 22
 		-L$(M2DIR)/software/libbase \
22 23
 		-L$(CRTDIR) \
23  
-		-L$(MISPDIR)/libm \
24  
-		-L$(MISPDIR)/libglue \
25  
-		-L$(MISPDIR)/liblua \
26  
-		--start-group -lbase -lcompiler_rt -lm -lglue -llua --end-group
  24
+		$(addprefix -L$(MISPDIR)/lib,$(OURLIBS)) \
  25
+		--start-group -lbase -lcompiler_rt $(addprefix -l,$(OURLIBS)) --end-group
27 26
 	chmod -x $@
28 27
 
  28
+%.o: %.c
  29
+	$(compile-dep)
  30
+
29 31
 libs:
30  
-	make -C $(MISPDIR)/libm
31  
-	make -C $(MISPDIR)/libglue
32  
-	make -C $(MISPDIR)/liblua
  32
+	for lib in $(OURLIBS); do \
  33
+		make -C $(MISPDIR)/lib$$lib; \
  34
+	done
33 35
 
34 36
 clean:
35 37
 	rm -f $(OBJECTS) $(OBJECTS:.o=.d) misp.elf misp.bin .*~ *~
36  
-	make -C $(MISPDIR)/libm clean
37  
-	make -C $(MISPDIR)/libglue clean
38  
-	make -C $(MISPDIR)/liblua clean
  38
+	for lib in $(OURLIBS); do \
  39
+		make -C $(MISPDIR)/lib$$lib clean; \
  40
+	done
39 41
 
40 42
 .PHONY: clean libs flash
4  libglue/Makefile
@@ -3,7 +3,6 @@ include $(MISPDIR)/common.mak
3 3
 
4 4
 OBJECTS=file.o getenv.o
5 5
 
6  
-
7 6
 all: libglue.a
8 7
 
9 8
 # pull in dependency info for *existing* .o files
@@ -13,6 +12,9 @@ libglue.a: $(OBJECTS)
13 12
 	$(AR) clr libglue.a $(OBJECTS)
14 13
 	$(RANLIB) libglue.a
15 14
 
  15
+%.o: %.c
  16
+	$(compile-dep)
  17
+
16 18
 .PHONY: clean
17 19
 
18 20
 clean:
4  liblua/Makefile
... ...
@@ -1,5 +1,4 @@
1 1
 MISPDIR=..
2  
-SRCDIR=$(LUADIR)/src/
3 2
 include $(MISPDIR)/common.mak
4 3
 
5 4
 CFLAGS+=-I. -DLUA_IEEEENDIAN=1 -Dstrcoll=strcmp
@@ -18,6 +17,9 @@ liblua.a: $(OBJECTS)
18 17
 	$(AR) clr liblua.a $(OBJECTS)
19 18
 	$(RANLIB) liblua.a
20 19
 
  20
+%.o: $(LUADIR)/src/%.c
  21
+	$(compile-dep)
  22
+
21 23
 .PHONY: clean
22 24
 
23 25
 clean:
4  libm/Makefile
@@ -13,7 +13,6 @@ e_cosh.o   e_jn.o        e_scalb.o      s_asinh.o     s_fabs.o      s_log1p.o
13 13
 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 \
14 14
 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
15 15
 
16  
-
17 16
 all: libm.a
18 17
 
19 18
 # pull in dependency info for *existing* .o files
@@ -23,6 +22,9 @@ libm.a: $(OBJECTS)
23 22
 	$(AR) clr libm.a $(OBJECTS)
24 23
 	$(RANLIB) libm.a
25 24
 
  25
+%.o: %.c
  26
+	$(compile-dep)
  27
+
26 28
 .PHONY: clean
27 29
 
28 30
 clean:
28  libyaffs2/Makefile
... ...
@@ -0,0 +1,28 @@
  1
+MISPDIR=..
  2
+include $(MISPDIR)/common.mak
  3
+
  4
+CFLAGS+=-include $(YAFFSDIR)/direct/yportenv.h -I$(YAFFSDIR)/direct -I$(YAFFSDIR)
  5
+CFLAGS+=-DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_DEFINES_TYPES -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES
  6
+
  7
+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
  8
+OBJECTS+=yaffs_hweight.o yaffs_qsort.o
  9
+
  10
+all: libyaffs2.a
  11
+
  12
+# pull in dependency info for *existing* .o files
  13
+-include $(OBJECTS:.o=.d)
  14
+
  15
+libyaffs2.a: $(OBJECTS)
  16
+	$(AR) clr libyaffs2.a $(OBJECTS)
  17
+	$(RANLIB) libyaffs2.a
  18
+
  19
+%.o: $(YAFFSDIR)/%.c
  20
+	$(compile-dep)
  21
+
  22
+%.o: $(YAFFSDIR)/direct/%.c
  23
+	$(compile-dep)
  24
+
  25
+.PHONY: clean
  26
+
  27
+clean:
  28
+	rm -f $(OBJECTS) $(OBJECTS:.o=.d) libyaffs2.a .*~ *~

No commit comments for this range

Something went wrong with that request. Please try again.