- Bash Script example - http://www.cs.iastate.edu/~cs104/notes/scripts.html
- Linux terminal output redirection
$ script.sh &>> temp.txt - [bash v4.0+] File test operators - http://tldp.org/LDP/abs/html/fto.html

Tuesday, July 27, 2010
Linux Bash Scripts
Saturday, July 24, 2010
GNU Make
5.7 Recursive Use of make
Recursive use of make means using make as a command in a makefile. This technique is useful when you want separate makefiles for various subsystems that compose a larger system. For example, suppose you have a subdirectory subdir which has its own makefile, and you would like the containing directory's makefile to run make on the subdirectory. You can do it by writing this:
subsystem:
cd subdir && $(MAKE)
or, equivalently, this (see Summary of Options):
subsystem:
$(MAKE) -C subdir
You can write recursive make commands just by copying this example, but there are many things to know about how they work and why, and about how the sub-make relates to the top-level make. You may also find it useful to declare targets that invoke recursive make commands as `.PHONY' (for more discussion on when this is useful, see Phony Targets).
For your convenience, when GNU make starts (after it has processed any -C options) it sets the variable CURDIR to the pathname of the current working directory. This value is never touched by make again: in particular note that if you include files from other directories the value of CURDIR does not change. The value has the same precedence it would have if it were set in the makefile (by default, an environment variable CURDIR will not override this value). Note that setting this variable has no impact on the operation of make (it does not cause make to change its working directory, for example).
- MAKE Variable: The special effects of using `$(MAKE)'.
- Variables/Recursion: How to communicate variables to a sub-
make. - Options/Recursion: How to communicate options to a sub-
make. - -w Option: How the `-w' or `--print-directory' option helps debug use of recursive
makecommands.
Thursday, July 22, 2010
PC Systems Programming Essentials
- Introduction to Binary and Hexadecimal (~27K)
- Binary Operations (~26K)
- Binary Manipulations (~10K)
- Memory in the PC (~23K)
- Calling Interrupts (~21K)
- Hardware Ports (~20K)
Sunday, July 18, 2010
Working Note
- added bof_thread.h to /src/libjasper/include/jasper
- added bof_thread.h to libjasperinclude_HEADERS = \... in the Make file /src/libjasper/include/jasper
- moved #include
to the jasper.h - undo step 1-3, remove bof_thread.h
- added the linkedList struct and functions to the jas_malloc.h
- implemented the function body in the jas_malloc.c
- The imgcmp is using the jasper_seq.c as well, so if the linkedlist is available jasper.c and jasper_seq.c, it will cause the problem in compiling in the imgcmp.c, therefore, the variable and functions for the linkedlist are defined in the jasper_malloc.c which is available for both jasper.c and imgcmp.c
- extern for the variable
- file A - the host, host the variable name and store its value
- file B - the one uses the variable in file A - to read and write
Notes to Jasper Software
1. Linux
==================
- changed the -p to -pg in the CFLAG from all the Makefile from all subdirectory in the Jasper package
=====================================
2. Simple Scalar in cygwin
=====================================
------------------------------------------------------
--------------------------------------------------
2.2 Generate Assembly code in SimpleScalar
--------------------------------------------------
......
=======================
4. thread in sim-mpfast
---------------------------------
- Need this header file
- Need the following library
/mp_simplesim/libssmp.a -o jasper jasper.o ../libjasper/libjasper.la
- Changes made to the Makefile (src/appl/Makefile)