1 | XCOMM $Id: NetBSDLib.rules,v 1.1 1999-01-30 03:43:15 ghudson Exp $ |
---|
2 | |
---|
3 | /* NetBSD shared library rules. May need more hacking for ELF platforms. */ |
---|
4 | |
---|
5 | #ifndef HasSharedLibraries |
---|
6 | #define HasSharedLibraries YES |
---|
7 | #endif |
---|
8 | #ifndef SharedDataSeparation |
---|
9 | #define SharedDataSeparation NO |
---|
10 | #endif |
---|
11 | #ifndef SharedCodeDef |
---|
12 | #define SharedCodeDef |
---|
13 | #endif |
---|
14 | #ifndef SharedLibraryDef |
---|
15 | #define SharedLibraryDef -DBSDSHLIB |
---|
16 | #endif |
---|
17 | #ifndef ShLibIncludeFile |
---|
18 | #define ShLibIncludeFile <NetBSDLib.tmpl> |
---|
19 | #endif |
---|
20 | #ifndef SharedLibraryLoadFlags |
---|
21 | #define SharedLibraryLoadFlags -Bshareable |
---|
22 | #endif |
---|
23 | #ifndef PositionIndependentCFlags |
---|
24 | #define PositionIndependentCFlags -fpic |
---|
25 | #endif |
---|
26 | |
---|
27 | /* |
---|
28 | * InstallSharedLibrary - generate rules to install the shared library. |
---|
29 | */ |
---|
30 | #ifndef InstallSharedLibrary |
---|
31 | #define InstallSharedLibrary(libname,rev,dest) @@\ |
---|
32 | install:: Concat(lib,libname.so.rev) @@\ |
---|
33 | MakeDir($(DESTDIR)dest) @@\ |
---|
34 | $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest |
---|
35 | |
---|
36 | #endif /* InstallSharedLibrary */ |
---|
37 | |
---|
38 | /* |
---|
39 | * InstallSharedLibraryData - generate rules to install the shared library data |
---|
40 | */ |
---|
41 | #ifndef InstallSharedLibraryData |
---|
42 | #define InstallSharedLibraryData(libname,rev,dest) |
---|
43 | #endif /* InstallSharedLibraryData */ |
---|
44 | |
---|
45 | |
---|
46 | /* |
---|
47 | * SharedLibraryTarget - generate rules to create a shared library. |
---|
48 | */ |
---|
49 | #ifndef SharedLibraryTarget |
---|
50 | #define SharedLibraryTarget(libname,rev,solist,down,up) @@\ |
---|
51 | AllTarget(Concat(lib,libname.so.rev)) @@\ |
---|
52 | @@\ |
---|
53 | Concat(lib,libname.so.rev): solist @@\ |
---|
54 | (cd down; $(LD) -o up/$@ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\ |
---|
55 | @@\ |
---|
56 | clean:: @@\ |
---|
57 | $(RM) Concat(lib,libname.so.rev) |
---|
58 | |
---|
59 | #endif /* SharedLibraryTarget */ |
---|
60 | |
---|
61 | /* |
---|
62 | * SharedLibraryDataTarget - generate rules to create shlib data file; |
---|
63 | */ |
---|
64 | #ifndef SharedLibraryDataTarget |
---|
65 | #define SharedLibraryDataTarget(libname,rev,salist) |
---|
66 | #endif /* SharedLibraryTarget */ |
---|