Skip to content

Commit

Permalink
tree.make: use Makefile to generate tree.make with default tools set
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Zhang authored and jwise committed Nov 1, 2017
1 parent 42db63a commit d21ddb0
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ verif/sim
vmod/dw_components/
outdir/
.nvprojectname
tree.make
52 changes: 52 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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 "================================================================"
23 changes: 0 additions & 23 deletions tree.make

This file was deleted.

0 comments on commit d21ddb0

Please sign in to comment.