diff --git a/.gitignore b/.gitignore index ce8ce6fc..f9f2e0b5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ verif/sim vmod/dw_components/ outdir/ .nvprojectname +tree.make diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..6d5d6ae4 --- /dev/null +++ b/Makefile @@ -0,0 +1,52 @@ +#!/usr/bin/env make + +## VARIABLES +TREE_MAKE := tree.make + +## +## _default should always be the first dependency (you can add extra local actions with default::) +## + +default: $(TREE_MAKE) + +DEFAULT_CPP := /home/utils/gcc-4.0.0/bin/cpp +DEFAULT_GCC := /home/utils/gcc-4.0.0/bin/g++ +DEFAULT_PERL := /home/utils/perl-5.8.8/bin/perl +DEFAULT_JAVA := /home/utils/java/jdk1.8.0_131/bin/java +DEFAULT_PROJ := nv_large nv_small + +$(TREE_MAKE): Makefile + @echo "Creating tree.make to setup your working environment and projects" + @echo "## ================================================================" > $@ + @echo "## NVDLA Open Source Project " >> $@ + @echo "## " >> $@ + @echo "## Copyright(c) 2016 - 2017 NVIDIA Corporation. Licensed under the" >> $@ + @echo "## NVDLA Open Hardware License; Check LICENSE which comes with " >> $@ + @echo "## this distribution for more information. " >> $@ + @echo "## ================================================================" >> $@ + @echo " " >> $@ + @echo " " >> $@ + @echo "##======================= " >> $@ + @echo "## Project Name Setup, multiple projects supported " >> $@ + @echo "##======================= " >> $@ + @read -p "Enter projects name (Press ENTER if use: $(DEFAULT_PROJ)):" opt_proj; if [ "_$$opt_proj" = "_" ]; then echo "PROJECTS := $(DEFAULT_PROJ)" >> $@; else echo "PROJECTS := $$opt_proj" >> $@; fi + @echo " " >> $@ + @echo "##======================= " >> $@ + @echo "##Linux Environment Setup " >> $@ + @echo "##======================= " >> $@ + @echo " " >> $@ + @echo "## c pre-processor " >> $@ + @read -p "Enter c pre-process path (Press ENTER if use: $(DEFAULT_CPP)):" opt_cpp; if [ "_$$opt_cpp" = "_" ]; then echo "CPP := $(DEFAULT_CPP)" >> $@; else echo "CPP := $$opt_cpp" >> $@; fi + @echo " " >> $@ + @echo "## c++ compiler " >> $@ + @read -p "Enter g++ path (Press ENTER if use: $(DEFAULT_GCC)):" opt_gcc; if [ "_$$opt_gcc" = "_" ]; then echo "GCC := $(DEFAULT_GCC)" >> $@; else echo "GCC := $$opt_gcc" >> $@; fi + @echo " " >> $@ + @echo "## perl: most script is written in perl " >> $@ + @read -p "Enter perl path (Press ENTER if use: $(DEFAULT_PERL)):" opt_perl; if [ "_$$opt_perl" = "_" ]; then echo "PERL := $(DEFAULT_PERL)" >> $@; else echo "PERL := $$opt_perl" >> $@; fi + @echo " " >> $@ + @echo "## java: used in regester generation " >> $@ + @read -p "Enter java path (Press ENTER if use: $(DEFAULT_JAVA)):" opt_java; if [ "_$$opt_java" = "_" ]; then echo "JAVA := $(DEFAULT_JAVA)" >> $@; else echo "JAVA := $$opt_java" >> $@; fi + @echo + @echo "================================================================" + @echo "$@ is created successfully, and you can edit $@ manually later" + @echo "================================================================" diff --git a/tree.make b/tree.make deleted file mode 100644 index c23a2658..00000000 --- a/tree.make +++ /dev/null @@ -1,23 +0,0 @@ -## ================================================================ -## NVDLA Open Source Project -## -## Copyright(c) 2016 - 2017 NVIDIA Corporation. Licensed under the -## NVDLA Open Hardware License; Check "LICENSE" which comes with -## this distribution for more information. -## ================================================================ -## -## set the chip you want to build -PROJECTS := nv_large nv_small - -#================= -# ENV TOOL setup -#================= -# c pre-processor -CPP := /home/utils/gcc-4.0.0/bin/cpp - -# used in ordt to generate reigster, need be newer than 1.7 -JAVA := /home/utils/java/jdk1.8.0_131/bin/java - -# used in ordt to generate reigster, need be newer than 1.7 -PERL := /home/utils/perl-5.8.8/bin/perl -