- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Making separate deployment
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО04-05-2005 05:53 PM
тАО04-05-2005 05:53 PM
I have started using HP-UX just a week ago.
Prior i was working on Solaris.
To my extreme discomfort all my makefiles have stopped working here.
In solaris to prepare separate deployment I used:
-o $@ tag in build command to produce the output files.
I used to prefix path in .o like
/disk1/Deployement/A.o
/disk1/Deployement/B.o
etc,
Now my rule is
/disk1/Deployment/%.o:%.cpp
$(BUILD) $<
where $(BUILD) contains all compiler specific tags.
This used to work in solaris but here it gives error "Don't know how to make A.o" and subsequently all .o
Please help
Thanks in Advance
Solved! Go to Solution.
- Tags:
- make
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2005 06:18 PM
тАО04-05-2005 06:18 PM
Re: Making separate deployment
.cpp.o:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-05-2005 07:51 PM
тАО04-05-2005 07:51 PM
Re: Making separate deployment
On removing the prefix it creates the .o's in the same directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2005 02:03 PM
тАО04-06-2005 02:03 PM
Re: Making separate deployment
VPATH=/disk1/Deployment
OBJ=$(SRC:.c=.o)
all:
@$(MAKE) TARGET src="`echo *.c`"
TARGET: $(OBJ)
.c.o:
$(BUILD) $< -o $(VPATH)/$@
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2005 06:06 PM
тАО04-06-2005 06:06 PM
Re: Making separate deployment
What does this line do
@$(MAKE) TARGET src="`echo *.c`"
As far as i have tried it makes the .o in the destination directory which i am able to achieve.
But during linking it can't find those .o's as its searching for them in the current directory.
How do i accomplish only this linking part.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2005 07:47 PM
тАО04-06-2005 07:47 PM
SolutionLine that does `echo *.c` is to get around the pattern matching problem. It defines variable SRC which holds a list of all source files. Variable OBJ holds list of all object files, obtained from SRC where .c is substituted with .o suffix.
Here is a full example
VPATH=/disk1/Deployment
OBJ=$(SRC:.c=.o)
all:
@$(MAKE) $(VPATH)/a.out src="`echo *.c`"
$(VPATH)/a.out: $(OBJ)
cd $(VPATH); ld -o a.out /usr/ccs/lib/crt0.o $(OBJ) -lc
.c.o:
cc -c $< -o $(VPATH)/$@
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2005 11:02 PM
тАО04-06-2005 11:02 PM
Re: Making separate deployment
Thanks.
Gotcha.
All what i had to do was cd into the directory and then do linking.
One small confusion: my script was not working because i was using
%.o:%.cxx instead of .cxx.o
This % thing doesn't seem to work on HP-UX as its giving me an error
CC -0 -c ../source/file
Make: Cannot load CC. Stop.
But as soon as i replace
%.o:%.cxx with .cxx.o
everything works.
Since make isn't specific to any flavour of Unix then why is this thing happening?
Any comments.
- Tags:
- aCC