From: Bill Mills Date: Tue, 14 Sep 2010 23:44:55 +0000 (-0400) Subject: Port makefiles to Linux (while still supporting Windows) X-Git-Tag: IBL_0_5_1~77 X-Git-Url: https://git.ti.com/gitweb?p=keystone-rtos%2Fibl.git;a=commitdiff_plain;h=01233d29f7425f9d2a2c5deff2bc6275f70cfe0d;hp=bc518a68706a0d484e04937b68ff49db6c82cb3f Port makefiles to Linux (while still supporting Windows) Seems to build c6472 Also ignore Linux version of utility binaries Signed-off-by: Bill Mills --- diff --git a/hacky-stuff/fakedep b/hacky-stuff/fakedep new file mode 100755 index 0000000..5e79493 --- /dev/null +++ b/hacky-stuff/fakedep @@ -0,0 +1,3 @@ +#! /bin/sh +true + diff --git a/mk b/mk new file mode 120000 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 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 + diff --git a/src/driver/c64x/make/makefile b/src/driver/c64x/make/makefile index b2f6d40..51c96b3 100644 --- a/src/driver/c64x/make/makefile +++ b/src/driver/c64x/make/makefile @@ -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) diff --git a/src/make/c64x/makedefs.mk b/src/make/c64x/makedefs.mk index f613122..08de169 100644 --- a/src/make/c64x/makedefs.mk +++ b/src/make/c64x/makedefs.mk @@ -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 index 0000000..9e35fcd --- /dev/null +++ b/src/util/.gitignore @@ -0,0 +1,6 @@ +btoccs/b2ccs +btoccs/b2i2c +btoccs/bfaddsect +btoccs/bfmerge +btoccs/ccs2b +romparse_*/romparse diff --git a/src/util/romparse_c6472/Makefile b/src/util/romparse_c6472/Makefile index dc64e4b..d92fc0a 100644 --- a/src/util/romparse_c6472/Makefile +++ b/src/util/romparse_c6472/Makefile @@ -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 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 index 0000000..ea508c8 --- /dev/null +++ b/time-make-all @@ -0,0 +1,6 @@ +#! /bin/sh +./time-make clean +./time-make c6472 +LOGNAME=-null ./time-make c6472 + +