Makefile includes and shell environment during compile
Below is the top of my Makefile. On one machine, I have mysql_config5, and another, I have mysql_config. In my .bashrc file of one UNIX machine, I added an alias so that that mysql_config5 is mysql_config, however, when I do make, it doesn't use that environment and I get compile errors, unless I manually change the makefile.
How do I know which shell Make is using? And how can I control the environment variables/commands?
I also apologize if this post belongs in the shell part of the forum, but its relevant to compiling C++ so I thought its also good to post here.
I suppose it generated -I and -L -lxxx -lyyy, but usually you can just put them in the Makefile as assignments or make includes. You might generate the variable setup with a make include, and then just reference the make variables.
The cc can make an include dependency lists using -I.
ldd can tell you where the -L dirs are, although if dynamic libs are used, there is usually an environment variable for all the necessary directories, so you need just -l's.
I have a make file for C program, which always gives the error
ld: 0711-738 ERROR: Input file ../src/file_name.o
XCOFF32 object files are not allowed in 64 mode
Does anybody know the problem?
Thanks for contribution (2 Replies)
Hello,
I have a Makefile that converts wrl (vrml) files to html files...
how can I use a shell script in that makefile which works on all html files after converting?
The Shell Script have to find and replace a String in every createt html file.
sorry I'm a Newbie, so I hope someone can... (0 Replies)
Dear all
I try to write a makefile for my code which have many source files, 1 header file that i make and exist into same folder with other source files and some other header files (by libraries witch i use) that found in other folders.
In my header file i have put all other #includes for... (3 Replies)
this is my first post so Hello,
here is my question
@top level Makefile should not set values for
environment variables FC, CC, FFLAGS (etc) but
use the ones that mpi_make sets.
So as you can see i have to run an mpi program, in fortran and i am supposed to do the above.the program was... (3 Replies)
Hi,
Can we execute a shell script by makefile.
I mean we will write a shell script in a make file and it will be executed when we compile the C++ program using make file. (2 Replies)
I've seen a few other threads like this, but they either went unanswered or failed to answer my question.
How do I set an environment variable in a Makefile?
What I'm trying to do is use GNU make to automate an ant build.
In order to run ant, I've got to first set a few environment... (1 Reply)
:( :confused: Does anybody here know how to compile and run C++ programs in UNIX enviroment? I am so confused. Any help on this would be greatly appreciated! Thanks! (5 Replies)