Operating System - HP-UX
1753884
Members
7357
Online
108809
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-16-2003 04:15 PM
тАО08-16-2003 04:15 PM
makefile
I am trying to create a make file.
WhatI need to do is create a makefile that will compile two .cpp files and link them together. Does anyone know how I can create this makefile in the simplest of terms. Thankyou.
WhatI need to do is create a makefile that will compile two .cpp files and link them together. Does anyone know how I can create this makefile in the simplest of terms. Thankyou.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-17-2003 06:47 AM
тАО08-17-2003 06:47 AM
Re: makefile
Brian,
There are numerous resources available in the net.
This book may be old but still holds good to start with makefiles.
http://www.oreilly.com/catalog/make2/
For a headstart tutorial
http://linux.oreillynet.com/pub/a/linux/2002/01/31/make_intro.html
For a complete reference (gnu site is not loading for me right now). Check the manuals section for gmake.
HTH,
Umapathy
There are numerous resources available in the net.
This book may be old but still holds good to start with makefiles.
http://www.oreilly.com/catalog/make2/
For a headstart tutorial
http://linux.oreillynet.com/pub/a/linux/2002/01/31/make_intro.html
For a complete reference (gnu site is not loading for me right now). Check the manuals section for gmake.
HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2003 12:11 AM
тАО08-18-2003 12:11 AM
Re: makefile
The make(1) man page contains the simplest example of what you want:
The following makefile says that pgm depends on two files: a.o and b.o, and that they in turn depend on their corresponding source files (a.c and b.c) and a common file incl.h:
OBJS = a.o b.o
pgm: $(OBJS)
cc $(OBJS) -o pgm
a.o: incl.h a.c
cc -c a.c
b.o: incl.h b.c
cc -c b.c
Just change the dependency lists and commands (remember tabs!)
Regards,
Steve
The following makefile says that pgm depends on two files: a.o and b.o, and that they in turn depend on their corresponding source files (a.c and b.c) and a common file incl.h:
OBJS = a.o b.o
pgm: $(OBJS)
a.o: incl.h a.c
b.o: incl.h b.c
Just change the dependency lists and commands (remember tabs!)
Regards,
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-18-2003 12:39 AM
тАО08-18-2003 12:39 AM
Re: makefile
Hi,
Here s the sample makefile. Let a.cpp, b.cpp are the cpp files and the binary is z. So, in make file you need to write as below. Make sure that tab is given after ':' you can compile this by using 'make -f'
a.o: CC -c -o a.cpp
b.o: CC -c -o b.cpp
z: a.o b.o
Regards
VJ.
Here s the sample makefile. Let a.cpp, b.cpp are the cpp files and the binary is z. So, in make file you need to write as below. Make sure that tab is given after ':' you can compile this by using 'make -f
a.o: CC -c -o a.cpp
b.o: CC -c -o b.cpp
z: a.o b.o
Regards
VJ.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP