Subject: Re: imakefile problem
To: Bevis Peters <bevis@APG.PH.UCL.AC.UK>
From: Peter Berg <berg@student.tu-freiberg.de>
List: port-arm32
Date: 08/16/1996 22:25:53
>>>>> -> == bevis@APG.PH.UCL.AC.UK (Bevis Peters) wrote:

	->> I'm trying to compile some stuff with X on RiscBSD. It's
	->> all very simple stuff, consisting of two programs - the
	->> main code and the X interface bit; mars1d.c and
	->> x_interface.c

	->> Here's my Imakefile:

	->> CC= cc LIBS= -lm -lX11 CFLAGS=

	->> OBJ = mars1d.o x_interface.o

	->> mars1d: $(OBJ) $(CC) -o $@ $(CFLAGS) $(OBJ) -L$(LIBDIR)
	->> $(LIBS) -I$(INCDIR)

	->> $(OBJ): defs.h $(CC) $(CFLAGS) -c $*.c -I$(INCDIR)

	->> xmkmf then works fine and produces a Makefile.

	->> On my work machines (Ultrix and OS/F) that Makefile
	->> compiles it all fine, but on RBSD I get the error

	->> Error: x_interface.c: 3: Cannot open file X11/Xlib.h for
	->> include Error: x_interface.c: 4: Cannot open file
	->> X11/Xutil.h for include

	->> Here are the first few lines of x_interface.c:

	->> #include <stdio.h> #include <X11/XliAAb.h> #include
<X11/Xutil.h> #include <math.h>

	->> Now compiling x_interface.c manually with a
	->> -I/usr/X11R6/include/ works fine, but putting
	->> -I/usr/X11R6/include/ into the Makefile does not.

	->> How do I get the Makefile to see /usr/X11R6/include/? Any
	->> help much appreciated.

	->> bevis

Including some options in a xmkmf generated Makefile is a realy silly and 
complicated thing. You have to make the chages at the right point in the
last part of the makefile.

Try a CFLAGS = -I/usr/X11R6/include

in the Imakefile, this should be better.



Ciao, Peter

 _____  _          ____   _____ _____  
|  __ \(_)        |  _ \ / ____|  __ \   The UNIX for RiscPC 6x0/7x0
| |__) |_ ___  ___| |_) | (___ | |  | |
|  _  /| / __|/ __|  _ < \___ \| |  | |  If you need windows than take 
| | \ \| \__ \ (__| |_) |____) | |__| |            X-windows !
|_|  \_\_|___/\___|____/|_____/|_____/  
                                        E-Mail: berg@student.tu-freiberg.de