07-05-2005
Here is one sample makefile for your purpose
# Sample Makefile
SHELL=/bin/sh
.KEEP_STATE:
# Include .cpp in suffixes list
.SUFFIXES:$(.SUFFIXES) .cpp
# Rule for .cpp to .o
.cpp.o:
${COMPILE.cc} -o $@ $<
SOURCE_PATH=${HOME}/source
INCLUDE_PATH=-I.
OBJECTS = ${SOURCE_PATH}/a.o
TARGET=a.out
CPPFLAGS=${INCLUDE_PATH}-mt
all : ${TARGET}
${TARGET}: ${OBJECTS}
$(CCC) -o ${TARGET} ${OBJECTS}
clean:
$(RM) ${TARGET} ${OBJECTS}
In case the source files and Header files are present in other directories, then modify the paths pointed by variables INCLUDE_PATH and SOURCE_PATH respectively..
I hope I am clear with the description.
Note: Kindly see the bolded commands starting with spaces. These are not the spaces but Tab.
Last edited by amit_sapre; 07-05-2005 at 11:04 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I would like to use the result of a query in another query. How do I redirect/add the output to another variable?
$result = odbc_exec($connect, $query);
while ($row = odbc_fetch_array($result)) {
echo $row,"\n";
}
odbc_close($connect);
?>
This will output hostnames:
host1... (0 Replies)
Discussion started by: hazno
0 Replies
2. UNIX for Advanced & Expert Users
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
3. UNIX for Advanced & Expert Users
Hi,
I have a few questions about makefiles. I have defined my own version of a dependency file (.d) by creating it in code and called it say .dd. Now this file I have included in the makefile with the include statement. (There are a whole bunch of these files so I've defined this as a rule which... (2 Replies)
Discussion started by: shishirm
2 Replies
4. Programming
Hi all,
I'm new to make files . I'm writing a make file to compile and create .so files. i've 20 .cpp files. I want to compile one file at a time and then i've to create 1 .so for each file that i compiled.
for eg:
list.mk is having all the 20 .spp files.
name = a.cpp
name =+... (2 Replies)
Discussion started by: vij_krr
2 Replies
5. Shell Programming and Scripting
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies
6. UNIX for Advanced & Expert Users
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
7. Homework & Coursework Questions
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
8. Homework & Coursework Questions
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:
I have been trying to make the program swap but i have been getting errors with the makefile such as
driver.o:... (1 Reply)
Discussion started by: mgyeah
1 Replies
9. Shell Programming and Scripting
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Discussion started by: DevendraG
2 Replies
10. Shell Programming and Scripting
Dear all,
I have a quite simple question about how to manipulate "makefile.am". I intend to:
1. "CFLAGS" and "CXXFLAGS" have no value at all. I know that these values get "-g -O2" by default. On the other hand, when I try to set them as "CFLAGS = " in "makefile.am", I get warning messages... (4 Replies)
Discussion started by: Dandan
4 Replies
LEARN ABOUT DEBIAN
sources
Participants and synchronization sources.(3) Library Functions Manual Participants and synchronization sources.(3)
NAME
Participants and synchronization sources. -
Classes
class SDESItemsHolder
Holds the SDES items and related information from a participant in an RTP application.
class Participant
A class of objects representing remote participants (RTP applications) in a multimedia session.
class SyncSource
Synchronization source in an RTP session.
class RTPApplication
An RTP application, holding identifying RTCP SDES item values.
Functions
__EXPORT RTPApplication & defaultApplication ()
Get the RTPApplication object for the 'default' application (the only one used by common applications -those that only implement one
'RTP application').
Detailed Description
Function Documentation
__EXPORT RTPApplication& defaultApplication ()
Get the RTPApplication object for the 'default' application (the only one used by common applications -those that only implement one 'RTP
application'). Note that this application object differs from all the others that may be defined in that it is automatically constructed by
the ccRTP stack and its CNAME is automatically assigned (as user@host), whereas the other application objects' CNAME is provided to its
constructor.
Examples:
ccrtptest.cpp, rtphello.cpp, rtplisten.cpp, and rtpsend.cpp.
Author
Generated automatically by Doxygen for ccRTP from the source code.
ccRTP Sat Jun 23 2012 Participants and synchronization sources.(3)