Port makefiles to Linux (while still supporting Windows)
authorBill Mills <wmills@ti.com>
Tue, 14 Sep 2010 23:44:55 +0000 (19:44 -0400)
committerBill Mills <wmills@ti.com>
Tue, 14 Sep 2010 23:47:07 +0000 (19:47 -0400)
Seems to build c6472
Also ignore Linux version of utility binaries

Signed-off-by: Bill Mills <wmills@ti.com>
hacky-stuff/fakedep [new file with mode: 0755]
mk [new symlink]
setenv [new file with mode: 0644]
src/driver/c64x/make/makefile
src/make/c64x/makedefs.mk
src/util/.gitignore [new file with mode: 0644]
src/util/romparse_c6472/Makefile
time-make [new file with mode: 0755]
time-make-all [new file with mode: 0755]

diff --git a/hacky-stuff/fakedep b/hacky-stuff/fakedep
new file mode 100755 (executable)
index 0000000..5e79493
--- /dev/null
@@ -0,0 +1,3 @@
+#! /bin/sh
+true
+
diff --git a/mk b/mk
new file mode 120000 (symlink)
index 0000000..2b2deda
--- /dev/null
+++ b/mk
@@ -0,0 +1 @@
+time-make
\ No newline at end of file
diff --git a/setenv b/setenv
new file mode 100644 (file)
index 0000000..2794314
--- /dev/null
+++ b/setenv
@@ -0,0 +1,14 @@
+export OS=Linux
+export C6X_BASE_DIR=/opt/CCSv4/ccsv4/tools/compiler/c6000
+export C6X_C_DIR="$C6X_BASE_DIR/include;$C6X_BASE_DIR/lib;"
+export C_DIR="$C6X_C_DIR"
+
+PATH=$C6X_BASE_DIR/bin:$PATH
+
+rm hacky-stuff/cgtools; ln -sf $C6X_BASE_DIR hacky-stuff/cgtools
+
+export TOOLSC6X=$PWD/hacky-stuff
+export TOOLSC6XDOS=$TOOLSC6X
+export MAKEDEPPATH=$PWD/hacky-stuff/fakedep
+export TOOLSBIOSC6XDOS=$PWD/hacky-stuff/bios-stuff-qq
+
index b2f6d405ffa4680f398f0cf76990fc98cb062f12..51c96b39a2c0f4a9b5215b0850aa06053c90ed9a 100644 (file)
@@ -48,7 +48,7 @@ C6X_C_DIR+= ;$(IBL_ROOT)/hw/timer
 C6X_C_DIR+= ;$(IBL_ROOT)/hw/nands
 export C6X_C_DIR
 
-vpath % $(ECODIR)/$(ETHDIR); $(ECODIR)/$(STRMDIR); $(ECODIR)/$(TIMDIR); $(ECODIR)/$(NANDDIR)
+vpath % $(subst ;,$(PATHSEP), $(ECODIR)/$(ETHDIR); $(ECODIR)/$(STRMDIR); $(ECODIR)/$(TIMDIR); $(ECODIR)/$(NANDDIR) )
 
 
 driver: gen_cdefdep makefile $(OBJS)
index f613122dd05643eb61a4239a6186597fd039d990..08de169e397c14035c1d4a6a675451d6a26c3171 100644 (file)
@@ -32,6 +32,14 @@ CP          = cp -f
 MV          = mv -f
 CPUDIR      = c64x
 
+ifeq ($(OS),Linux)
+    DIRSEP=/
+    PATHSEP=:
+else
+    DIRSEP=$(subst /,\,/)
+    PATHSEP=;
+endif
+
 
 # CPU Class flags
 CPUFLAGS   = -mv6400+
@@ -42,7 +50,7 @@ else
   ALLFARLIB       = $(TOOLSC6XDOS)/cgtools/lib/rts64plus.lib
 endif
 
-RTLIBS     = $(subst /,\,$(ALLFARLIB))
+RTLIBS     = $(subst /,$(DIRSEP),$(ALLFARLIB))
 
 # Common compilation flags
 # -c     : disable linker
@@ -90,12 +98,12 @@ FSTDINC  =$(TOOLSC6XDOS)/cgtools/include;$(TOOLSC6XDOS)/cgtools/lib
 FSTDINC +=;$(TOOLSC6XDOS)/rtdx/include;$(TOOLSC6XDOS)/rtdx/lib
 FSTDINC +=;$(TOOLSBIOSC6XDOS)/bios/include;$(TOOLSBIOSC6XDOS)/bios/lib
 FSTDINC +=;$(TOOLSBIOSC6XDOS)/xdais/include;;$(TOOLSBIOSC6XDOS)/xdais/src/api
-STDINC =$(subst /,\,$(FSTDINC))
+STDINC =$(subst /,$(DIRSEP),$(FSTDINC))
 
 # Include files for ASM in standard (non siu) modules
-STDAINC =$(subst /,\,$(TOOLSBIOSC6XDOS)/bios/include;$(GGROOT)/misc/$(CPUDIR))
+STDAINC =$(subst /,$(DIRSEP),$(TOOLSBIOSC6XDOS)/bios/include;$(GGROOT)/misc/$(CPUDIR))
 
 # Include files for this platform.  Change this for test code.
-PLATINC =$(subst /,\,$(GGROOT)/hw/$(CPUDIR);$(ECODIR)/gg/$(CPUDIR);$(ECODIR)/$(CPUDIR))
+PLATINC =$(subst /,$(DIRSEP),$(GGROOT)/hw/$(CPUDIR);$(ECODIR)/gg/$(CPUDIR);$(ECODIR)/$(CPUDIR))
 
 # Nothing past this point
diff --git a/src/util/.gitignore b/src/util/.gitignore
new file mode 100644 (file)
index 0000000..9e35fcd
--- /dev/null
@@ -0,0 +1,6 @@
+btoccs/b2ccs
+btoccs/b2i2c
+btoccs/bfaddsect
+btoccs/bfmerge
+btoccs/ccs2b
+romparse_*/romparse
index dc64e4b072902faf26e9ba3bc885125689188dad..d92fc0a338ff7c7368feaddba48a93d4d207d83b 100644 (file)
@@ -4,7 +4,7 @@ romparse: rparse.tab.o lex.yy.o romparse.c
 
 
 rparse.tab.o: rparse.y
-       bison -d -S bison.simple rparse.y
+       bison -d -S ./bison.simple rparse.y
        gcc -c rparse.tab.c
 
 lex.yy.o: rparse.flex
diff --git a/time-make b/time-make
new file mode 100755 (executable)
index 0000000..58b8bac
--- /dev/null
+++ b/time-make
@@ -0,0 +1,11 @@
+#! /bin/bash
+clear
+mkdir -p logs
+
+. setenv
+
+if [ -z "$LOG_NAME" ] ; then LOG_NAME=-$1 ; fi
+if [ "$LOG_NAME" = "-" ] ; then LOG_NAME="" ; fi
+
+$(which time) -v -o logs/make$LOG_NAME.time make -C src/make "$@" 2>&1 | tee logs/make$LOG_NAME.log
+
diff --git a/time-make-all b/time-make-all
new file mode 100755 (executable)
index 0000000..ea508c8
--- /dev/null
@@ -0,0 +1,6 @@
+#! /bin/sh
+./time-make clean
+./time-make c6472
+LOGNAME=-null ./time-make c6472
+
+