bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tweak for gnustep-make to make which_lib work on Darwin


From: Lars Sonchocky-Helldorf
Subject: tweak for gnustep-make to make which_lib work on Darwin
Date: Fri, 28 Jun 2002 22:06:12 +0200

After hours of unsuccessful trials to make gnustep-make/which_lib detect a given library on Darwin I finally found a solution which works at least partly: I added the following code to /opt/GNUstep/System/Makefiles/common.make line 244:

ifeq ($(findstring darwin, $(GNUSTEP_HOST_OS)), darwin)

  GNUSTEP_LIBRARIES_DIRS += /usr/lib

endif

and changed (just for debugging purposes) /opt/GNUstep/System/Makefiles/Instance/library.make line 68:

INTERNAL_LIBRARIES_DEPEND_UPON =                                \
  $(shell $(WHICH_LIB_SCRIPT)                                   \
   $(ALL_LIB_DIRS)                                              \
   $(LIBRARIES_DEPEND_UPON)                                     \
   debug=$(debug) profile=$(profile) shared=$(shared)           \
   libext=$(LIBEXT) shared_libext=$(SHARED_LIBEXT) show_all=yes)

As the result now libz is found. That is not exactly what I was going for, my original goal was to make which_lib detect libobjc_d.dylib during the build process of gnustep-base to link against it. I am somewhat lost and don't know what to do, gnustep-make is still a big mystery to me (I did my "fixes" by looking at the code, trying to understand what is going on and very much trial and error. So I don't know IF I tweaked the right variable. SYSTEM_LIB_DIR looked promising but I was not able to get that to work). Anyway here is the interesting part from the output of base's build process:

 Compiling file NSNumber11.m ...
rm -f NSNumber12.m
echo '#define TYPE_ORDER' `echo NSNumber12.m | sed -e "s,[^0-9],,g"` >NSNumber12.m
cat ./NSConcreteNumber.m >> NSNumber12.m
 Compiling file NSNumber12.m ...
>>Input:
shared = 1
debug = 1
profile = 0
libname_suffix = _d
libext = .a
shared_libext = .dylib
library names:
    z
library paths:
    ./shared_debug_obj/powerpc/darwin5/nx-gnu-gnu
    /opt/GNUstep/Local/Libraries/powerpc/darwin5/
    /opt/GNUstep/System/Libraries/powerpc/darwin5/nx-gnu-gnu/
    /opt/GNUstep/System/Libraries/powerpc/darwin5/
    /usr/lib/
other flags:
    -flat_namespace

>>Library z:
Scanning all paths for an exact match
 ./shared_debug_obj/powerpc/darwin5/nx-gnu-gnu/libz_d.dylib
 /opt/GNUstep/Local/Libraries/powerpc/darwin5//libz_d.dylib
 /opt/GNUstep/System/Libraries/powerpc/darwin5/nx-gnu-gnu//libz_d.dylib
 /opt/GNUstep/System/Libraries/powerpc/darwin5//libz_d.dylib
 /usr/lib//libz_d.dylib
Scanning all paths for an approximate match
 ./shared_debug_obj/powerpc/darwin5/nx-gnu-gnu/libz.dylib
 /opt/GNUstep/Local/Libraries/powerpc/darwin5//libz.dylib
 /opt/GNUstep/System/Libraries/powerpc/darwin5/nx-gnu-gnu//libz.dylib
 /opt/GNUstep/System/Libraries/powerpc/darwin5//libz.dylib
 /usr/lib//libz.dylib
  Found!
 Linking library libgnustep-base ...
ld: warning undefined symbols:
_gnustep_base_user_main

greetings, Lars




reply via email to

[Prev in Thread] Current Thread [Next in Thread]