Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newbie needs help with makefiles

Status
Not open for further replies.

TheBrewer

Programmer
Jun 29, 2000
3
0
0
US
Here's the deal, I need to get my applications to work on both an Onyx and an O2. I got them to work no problem on the O2, but I need to install the xpm and xbae packages on the Onyx. When I try to execute the makefile for the xpm package it tells me that it is expecting n32 objects but that something else is an o32 object. Any idea what I need to change in the makefile? I'm new to this UNIX stuff...
 
I don't know a solution to your exact problem, but I can give you a few pointers that may help.

This sounds like a problem with the compilation of the xpm package, and not the Makefile. Remember that the Makefile is just a mechanism for making sure that when you compile a program, the required objects are up to date.

The message you are getting sounds like you have a set of objects in one binary format, and you are trying to combine them with a set of objects that are in another binary format. I would guess that one of these sets of objects are the system libraries that have been installed, and the other objects are the compiled routines from the xpm package. Can you cut and paste a few lines from the output you are getting that would show some of the file names involved? This will help to clear things up in this area.

Now, it is likely that your C compiler is capable of producing both types of objects. The first thing to do is to look at the manual page for your C compiler (try "man cc"). Assuming that the system libraries are in n32 format, see what option you need to pass to the C compiler to produce these types of objects.

Next, take a copy of the "Makefile" that was provided with xpm. Put this somewhere safe so that you can't overwrite it. If things go badly wrong, you can copy it back into place.

Now edit "Makefile" using vi or similar. There is usually a variable set in the Makefile called "CFLAGS". Add the required option to the end of this line, and then try compiling xpm again. (Remember to put a space before your new option.) If there isn't a "CFLAGS" variable, there will probably be a "CC" variable. Try adding the option to this line if "CFLAGS" is not there.

(I just grabbed the generic xpm source file "xpm-3.4k.tar". In the "Makefile.noX" file there is a CFLAGS line, so you should be OK.)

I hope this helps. Good luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top