[lazarus] [patch] gtk Makefile
Sergio A. Kessler
sak at perio.unlp.edu.ar
Wed May 5 19:14:52 EDT 1999
"Michael A. Hess" <mhess at miraclec.com> el día Wed, 05 May 1999 02:18:56
-0400, escribió:
>Sergio A. Kessler wrote:
>>
>> this doesn't work work because in
>> override NEEDLIBDIR := $(NEEDLIBDIR) $(XLIBDIR)
>
>If you have your files setup exactly as they are taken from CVS then
>there isn't any reason why this shouldn't work. In fact I took this code
>right out of the gtk makefile. It was just left out of the lazarus
>makefile.
>
>> $(NEEDLIBDIR) take the value ../fcl ... and not ../fcl/linux ...
>
>NEEDUNITDIR deals with this not NEEDLIBDIR and it should be using
>
> ../fcl/$(OS_TARGET) which will set it to ../fcl/linux
yep, I confused NEEDLIBDIR with NEEDUNITDIR, NEEDLIBDIR is my problem
>> the makefile.fpc does not deal with XLIBDIR and GTKLIBDIR, and yes,
>> it is better to stick with the current setup :)
>
>Not directly but it deals with the NEEDLIBDIR which is what you are
>loading with the XLIBDIR and GTKLIBDIR values.
>
>> I'm aiming at simplify the things, if the gtk and lazarus makefile
>> read the /etc/ld.so.conf there is no need to use XLIBDIR or GTKLIBDIR,
>> then you don't need to edit the makefile for different systems.
>
>Again you shouldn't need to edit the makefile for different systems.
>That is why they setup the makefile system the way they did. You have to
>make a specific makefile for each section such as lazarus but it
>determines your OS and setup for you. You might have to modify some
>variables such as XLIBDIR if you libraries are not in standard places
>but that is all you need to modify.
but it wouldn't be better if you don't have to modify anything ?
in RH systems the X11 lib dir is at /usr/X11R6/lib and in others
systems is in /usr/lib/X11
look at the following patch for the gtk Makefile:
_______________________________
--- Makefile.orig Tue Apr 20 19:20:46 1999
+++ Makefile Fri May 7 08:54:48 1999
@@ -26,11 +26,7 @@
# As default make only the units
DEFAULTUNITS=1
-# Linux only:
-# Where are the X11 libraries ?
-XLIBDIR = /usr/X11/lib
-# Where are the GTK libraries (if different from the X11 dir)
-# GTKLIBDIR = /usr/lib
+SYSTEMLIBDIRS = $(shell cat /etc/ld.so.conf | awk '{ ORS=" "; print $$1 }')
#####################################################################
# Real targets
@@ -41,12 +37,11 @@
UNITOBJECTS=glib gdk gtk
EXEOBJECTS=entry notebook scribble-simple clist ttt_test pixmap list
-ifdef XLIBDIR
-override NEEDLIBDIR := $(NEEDLIBDIR) $(XLIBDIR)
-endif
-ifdef GTKLIBDIR
-override NEEDLIBDIR := $(NEEDLIBDIR) $(GTKLIBDIR)
+ifdef SYSTEMLIBDIRS
+override NEEDLIBDIR := $(NEEDLIBDIR) $(SYSTEMLIBDIRS)
endif
+
+NEEDUNITDIR = ./gtk ./gdk
# add GCC directory to list of needed dirs.
NEEDGCCLIB=YES
_______________________________
the patch is Linus friendly (it remove code :), whitout this
patch you can do a "make gtk" within gtk directory (because
of the NEEDUNITDIR variable) and it will work on most systems
where the gtk lib and the X lib are placed in different places.
I'm missing something ?
the patch is also attached, I will love if someone tell me
if it will be commited to the CVS or not (or if it's horrible)
Sergio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bin00001.bin
Type: application/octet-stream
Size: 909 bytes
Desc: "Makefile.gtk.patch"
Url : http://localhost/pipermail/lazarus/attachments/19990505/fe2dc5b3/bin00001.bin
More information about the Lazarus
mailing list