1 XCOMM $XdotOrg: xc/config/cf/scoLib.rules,v 1.1.4.2 2003/12/20 00:28:21 kaleb Exp $
2 XCOMM $Xorg: scoLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
3 XCOMM $XFree86: xc/config/cf/scoLib.rules,v 1.10 2003/12/18 16:38:34 dawes Exp $
6 # define UseExportLists YES
9 #ifndef SCOAbsShlibPath
10 # define SCOAbsShlibPath NO
14 # define SCOShlibFlags -h $(SHLIBDIR)/$@
16 # ifndef ExtraLoadFlags
17 # define ExtraLoadFlags -R $(USRLIBDIRPATH)
19 # define SCOShlibFlags -R $(SHLIBDIR) -h $@
23 * SharedLibraryTarget3 - generate rules to create a shared library;
24 * build it into a different name so that we do not hose people by having
25 * the library gone for long periods.
27 * Work around SCO sh enviroment size problem.
29 #ifndef SharedLibraryTarget3
30 #define SharedLibraryTarget3(libname,rev,solist1,solist2,solist3,down,up) @@\
31 AllTarget(Concat(lib,libname.so.rev)) @@\
33 Concat(lib,libname.so.rev): solist1 solist2 solist3 $(EXTRALIBRARYDEPS) @@\
35 echo -n $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags solist1 " " > Concat(down/lib,cmd) @@\
36 echo -n solist2 " " >> Concat(down/lib,cmd) @@\
37 echo -n solist3 " " >> Concat(down/lib,cmd) @@\
38 echo -n $(REQUIREDLIBS) >> Concat(down/lib,cmd) @@\
39 (cd down; $(SHELL) Concat(./lib,cmd)) @@\
40 $(RM) $@ Concat(lib,tmp1) Concat(lib,tmp2) @@\
42 @if $(SOSYMLINK); then (set -x; \ @@\
43 $(RM) Concat(lib,libname.so); \ @@\
44 $(LN) $@ Concat(lib,libname.so)); fi @@\
45 LinkBuildLibrary($@) @@\
46 LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
49 $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
51 #endif /* SharedLibraryTarget */
53 #ifndef LinkWithExports
55 # define LinkWithExports(libname,rev,solist,down,up) \
56 (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags solist $(REQUIREDLIBS)) @@\
57 if [ -f Concat(lib,libname.elist) ]; then \ @@\
58 $(RM) down/$@.exports $@.list; \ @@\
59 $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \ @@\
60 $(EXPORTLISTGEN) $@~ $@.list > down/$@.exports; \ @@\
61 (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags ShlibExportListOpt($@.exports) solist $(REQUIREDLIBS)); \ @@\
62 $(RM) down/$@.exports $@.list; \ @@\
65 # define LinkWithExports(libname,rev,solist,down,up) \
66 (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags solist $(REQUIREDLIBS))