software: include.mak -> common.mak
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 24 May 2012 17:02:59 +0000 (19:02 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 24 May 2012 17:02:59 +0000 (19:02 +0200)
software/bios/Makefile
software/common.mak [new file with mode: 0644]
software/include.mak [deleted file]
software/libbase/Makefile

index 128bc17ee1897c1ca2982c6ce2841c1ed7ac1cfa..325ba57d564b96f25db1df83044e2544ce5fbaa1 100644 (file)
@@ -1,5 +1,5 @@
 M2DIR=../..
-include $(M2DIR)/software/include.mak
+include $(M2DIR)/software/common.mak
 
 OBJECTS=crt0.o isr.o ddrinit.o main.o microudp.o tftp.o boot-helper.o boot.o
 
diff --git a/software/common.mak b/software/common.mak
new file mode 100644 (file)
index 0000000..0f90450
--- /dev/null
@@ -0,0 +1,55 @@
+# Mico32 toolchain
+#
+CROSS_COMPILER=lm32-rtems4.11-
+CLANG=clang -ccc-host-triple mico32-generic-generic -ccc-gcc-name $(CROSS_COMPILER)gcc
+
+CC_normal := $(CLANG)
+AR_normal := $(CROSS_COMPILER)ar
+AS_normal := $(CROSS_COMPILER)as
+LD_normal := $(CROSS_COMPILER)ld
+OBJCOPY_normal := $(CROSS_COMPILER)objcopy
+RANLIB_normal := $(CROSS_COMPILER)ranlib
+
+CC_quiet = @echo " CC " $@ && $(CLANG)
+AR_quiet = @echo " AR " $@ && $(CROSS_COMPILER)ar
+AS_quiet = @echo " AS " $@ && $(CROSS_COMPILER)as
+LD_quiet = @echo " LD " $@ && $(CROSS_COMPILER)ld
+OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(CROSS_COMPILER)objcopy
+RANLIB_quiet = @echo " RANLIB  " $@ && $(CROSS_COMPILER)ranlib
+
+ifeq ($(V),1)
+    CC = $(CC_normal)
+    AR = $(AR_normal)
+    AS = $(AS_normal)
+    LD = $(LD_normal)
+    OBJCOPY = $(OBJCOPY_normal)
+    RANLIB = $(RANLIB_normal)
+else
+    CC = $(CC_quiet)
+    AR = $(AR_quiet)
+    AS = $(AS_quiet)
+    LD = $(LD_quiet)
+    OBJCOPY = $(OBJCOPY_quiet)
+    RANLIB = $(RANLIB_quiet)
+endif
+
+# Toolchain options
+#
+INCLUDES_NOLIBC ?= -nostdinc -I$(M2DIR)/software/include/base
+INCLUDES = $(INCLUDES_NOLIBC) -I$(M2DIR)/software/include -I$(M2DIR)/common
+ASFLAGS = $(INCLUDES) -nostdinc
+CFLAGS = -O9 -Wall -Wstrict-prototypes -Wold-style-definition -Wshadow \
+        -Wmissing-prototypes -fsigned-char $(INCLUDES)
+LDFLAGS = -nostdlib -nodefaultlibs
+
+# compile and generate dependencies, based on
+# http://scottmcpeak.com/autodepend/autodepend.html
+
+%.o: %.c
+       $(CC) -c $(CFLAGS) $*.c -o $*.o
+       @$(CC_normal) -MM $(CFLAGS) $*.c > $*.d
+       @mv -f $*.d $*.d.tmp
+       @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
+       @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
+         sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
+       @rm -f $*.d.tmp
diff --git a/software/include.mak b/software/include.mak
deleted file mode 100644 (file)
index 0f90450..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-# Mico32 toolchain
-#
-CROSS_COMPILER=lm32-rtems4.11-
-CLANG=clang -ccc-host-triple mico32-generic-generic -ccc-gcc-name $(CROSS_COMPILER)gcc
-
-CC_normal := $(CLANG)
-AR_normal := $(CROSS_COMPILER)ar
-AS_normal := $(CROSS_COMPILER)as
-LD_normal := $(CROSS_COMPILER)ld
-OBJCOPY_normal := $(CROSS_COMPILER)objcopy
-RANLIB_normal := $(CROSS_COMPILER)ranlib
-
-CC_quiet = @echo " CC " $@ && $(CLANG)
-AR_quiet = @echo " AR " $@ && $(CROSS_COMPILER)ar
-AS_quiet = @echo " AS " $@ && $(CROSS_COMPILER)as
-LD_quiet = @echo " LD " $@ && $(CROSS_COMPILER)ld
-OBJCOPY_quiet = @echo " OBJCOPY " $@ && $(CROSS_COMPILER)objcopy
-RANLIB_quiet = @echo " RANLIB  " $@ && $(CROSS_COMPILER)ranlib
-
-ifeq ($(V),1)
-    CC = $(CC_normal)
-    AR = $(AR_normal)
-    AS = $(AS_normal)
-    LD = $(LD_normal)
-    OBJCOPY = $(OBJCOPY_normal)
-    RANLIB = $(RANLIB_normal)
-else
-    CC = $(CC_quiet)
-    AR = $(AR_quiet)
-    AS = $(AS_quiet)
-    LD = $(LD_quiet)
-    OBJCOPY = $(OBJCOPY_quiet)
-    RANLIB = $(RANLIB_quiet)
-endif
-
-# Toolchain options
-#
-INCLUDES_NOLIBC ?= -nostdinc -I$(M2DIR)/software/include/base
-INCLUDES = $(INCLUDES_NOLIBC) -I$(M2DIR)/software/include -I$(M2DIR)/common
-ASFLAGS = $(INCLUDES) -nostdinc
-CFLAGS = -O9 -Wall -Wstrict-prototypes -Wold-style-definition -Wshadow \
-        -Wmissing-prototypes -fsigned-char $(INCLUDES)
-LDFLAGS = -nostdlib -nodefaultlibs
-
-# compile and generate dependencies, based on
-# http://scottmcpeak.com/autodepend/autodepend.html
-
-%.o: %.c
-       $(CC) -c $(CFLAGS) $*.c -o $*.o
-       @$(CC_normal) -MM $(CFLAGS) $*.c > $*.d
-       @mv -f $*.d $*.d.tmp
-       @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
-       @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
-         sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
-       @rm -f $*.d.tmp
index 2ea9e1efaa50b8129016b0e71a62a125c65876ca..027af87fdd985484cedabd056c6c4b76d29b6864 100644 (file)
@@ -1,5 +1,5 @@
 M2DIR=../..
-include $(M2DIR)/software/include.mak
+include $(M2DIR)/software/common.mak
 
 OBJECTS=divsi3.o libc.o crc16.o crc32.o console.o timer.o system.o board.o uart.o softfloat.o softfloat-glue.o vsnprintf.o atof.o