Sponsored Content
Top Forums Programming Processing Arguments pased to Makefile Post 302768465 by DGPickett on Friday 8th of February 2013 03:29:50 PM
Old 02-08-2013
Try setting an environment variable you can test in a makefile to modify the make variable that goes on compile lines.
Else, define different targets and set the variable differently in each, like 'make unopt' and 'make optimum'.

You can also remove debugging support (-g in some compilers) and strip the objects when you optimize harder.

Last edited by DGPickett; 02-08-2013 at 05:05 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Makefile problem - How to run module load in a Makefile

Hi, I'm trying to run the module load command in a Makefile and i'm getting the following error: make: module: command not found Why is this? Is there any way to run this command in a Makefile? NOTE: command - module load msjava/sunjdk/1.5.0 works fine outside of the Makefile (2 Replies)
Discussion started by: hernandinho
2 Replies

2. UNIX for Advanced & Expert Users

Makefile executing another Makefile first?

I have 2 libraries in 2 different directories that I build with Makefiles. library B depends on library A. If I modify a .cpp file in library A and run lib B's Makefile can I have B's makefile to automatically rebuild library A? I am now rebuilding A, followed by B... but I'd like B to... (0 Replies)
Discussion started by: wwuster
0 Replies

3. Shell Programming and Scripting

How to make parallel processing rather than serial processing ??

Hello everybody, I have a little problem with one of my program. I made a plugin for collectd (a stats collector for my servers) but I have a problem to make it run in parallel. My program gathers stats from logs, so it needs to run in background waiting for any new lines added in the log... (0 Replies)
Discussion started by: Samb95
0 Replies

4. Homework & Coursework Questions

Help with Simple Multi-Level Makefile (Extremely New at Makefile)

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Basically, the prompt is make a makefile with various sub makefiles in their respective subdirectories. All code... (1 Reply)
Discussion started by: Tatl
1 Replies

5. Shell Programming and Scripting

grep with two arguments to arguments to surch for

Hello, is it possible to give grep two documents to surche for? like grep "test" /home/one.txt AND /home/two.txt ? thanks (1 Reply)
Discussion started by: Cybertron
1 Replies

6. Shell Programming and Scripting

To pass arguments to makefile using script

Hi, I want to run a target of makfile using script by passing different arguments to it again n again. I i need to grep certain things from the log file. eg make abc KAB=8 BAC=8 >& KAB_BAC.log grep "timeA" KAB_BAC.log grep "timeB" KAB_BAC.log (i want to store the difference of the two time... (0 Replies)
Discussion started by: vdhingra123
0 Replies

7. Programming

awk processing / Shell Script Processing to remove columns text file

Hello, I extracted a list of files in a directory with the command ls . However this is not my computer, so the ls functionality has been revamped so that it gives the filesizes in front like this : This is the output of ls command : I stored the output in a file filelist 1.1M... (5 Replies)
Discussion started by: ajayram
5 Replies

8. Shell Programming and Scripting

Processing Multiple Arguments in Command Line Options

Hi All, I am new to scripting. Could you please assist me . Here is my requirement. I have written a script that has 2 option flags defined. -l) calls some function with the arguments passed in front of -l -r) calls second function with the arguments passed in front of -r *) calls the... (7 Replies)
Discussion started by: Jay Deshpande
7 Replies

9. Programming

Passing arguments to customized makefile

Hello, How to pass arguments to make thru command line? Have read this and that threads, but still not clear. My customized Makefile as: # convert_program.mk: run: bash bash_srcipt.sh clean: rm ${OUT_PATH}/result.txtWhat I intend is to run like this: $ make -f convert_progam.mk... (4 Replies)
Discussion started by: yifangt
4 Replies

10. Shell Programming and Scripting

Processing arguments in a string

Hi The following code works when reading the arguments from the command line but fails when I try to read from a string. So this works while ; do case $1 in -dbversion) if '`" ]; then { echo "ERROR: missing value for '$1' (seen '$2')"; usage; exit 1; } else { shift;... (6 Replies)
Discussion started by: user052009
6 Replies
AIMK(1PVM)							  PVM Version 3.4							AIMK(1PVM)

NAME
aimk - Portable make wrapper script SYNOPSIS
aimk [ -here ] [ make arguments ] DESCRIPTION
aimk is a wrapper program for make, used to portably select options to build PVM and PVM applications on various machines. Each port of PVM is assigned an architecture name. The name is used both during compilation (to conditionally switch in code) and at runtime (to select an executable or host). aimk uses the value of environment variable $PVM_ARCH if it is set, otherwise it calls $PVM_ROOT/pvmgetarch to determine the architecture name. pvmgetarch is a script that sniffs at various parts of the system to determine the correct architecture name. It is updated as new PVM ports are defined, and can be augmented locally. aimk determines the machine architecture and execs make, passing it the architecture and a configuration file along with arguments supplied to aimk. It runs make in a subdirectory to prevent executables from becoming intermixed and to permit overlapping compiles. A different makefile can be placed in each subdirectory or a single makefile, Makefile.aimk, can be shared between architectures. Per-architecture definitions from the $PVM_ROOT/conf directory are appended to the common makefile. aimk calls make is called in one of three ways, depend- ing on what makefiles are present: i. If $PVM_ARCH/Makefile or $PVM_ARCH/makefile exists, change directory to $PVM_ARCH and exec make there: (cd $PVM_ARCH ; make PVM_ARCH=$PVM_ARCH < aimk args >) ii. Else if Makefile.aimk exists, create $PVM_ARCH directory if it doesn't exist, then: (cd $PVM_ARCH ; make -f $PVM_ROOT/conf/$PVM_ARCH.def -f ../Makefile.aimk PVM_ARCH=$PVM_ARCH < aimk args >) iii. Else just exec make in current directory: make PVM_ARCH=$PVM_ARCH < aimk args > If aimk succeeds in calling make, the exit status is that of make, otherwise it is 1. FLAGS
-here Forces aimk to run make in the current directory, e.g. converts case i. to case iii. EXAMPLES
The following Makefile.aimk file builds and installs hello, creating the PVM binary directory if it doesn't exist. It can be run concur- rently on machines of different types, sharing the same source directory. LDIR = -L$(PVM_ROOT)/lib/$(PVM_ARCH) PVMLIB = -lpvm3 SDIR = .. BDIR = $(HOME)/pvm3/bin XDIR = $(BDIR)/$(PVM_ARCH) CFLAGS = -g -I$(PVM_ROOT)/include LIBS = $(LDIR) $(PVMLIB) $(ARCHLIB) $(XDIR): - mkdir $(BDIR) $(XDIR) hello: $(SDIR)/hello.c $(XDIR) $(CC) $(CFLAGS) -o $@ $(SDIR)/$@.c $(LIBS) mv $@ $(XDIR) ENVIRONMENT
$PVM_ROOT Root path of PVM installation. $PVM_ARCH PVM architecture name for machine. FILES
$PVM_ROOT/lib/aimk The aimk program $PVM_ROOT/conf/$PVM_ARCH.def Arch config file SEE ALSO
pvm_intro(1PVM) 02 May, 1994 AIMK(1PVM)
All times are GMT -4. The time now is 11:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy