1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
$NetBSD: patch-ad,v 1.6 2001/05/02 21:46:08 dmcmahill Exp $
--- ./XView.rules.orig Tue Jun 29 01:13:20 1993
+++ ./XView.rules Tue May 1 22:40:32 2001
@@ -142,4 +142,21 @@
*/
#ifndef SubdirBuildNormalSharedLibraryTarget
+#if UseElfFormat == YES
+#define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
+AllTarget(lib/**/libname.so.rev) @@\
+ @@\
+lib/**/libname.so.rev:: solist @@\
+ $(RM) $@~ sodir/lib/**/libname.so.xs.o @@\
+ @if [ -f xstrings ]; then \ @@\
+ $(RM) strings; $(CP) xstrings strings; fi @@\
+ (cd sodir; $(CC) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) @@\
+ -@if [ -f strings~ ]; then $(RM) strings~; else exit 0; fi @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) lib/**/libname.so.rev sodir/?*.o strings*
+
+#else
#define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
AllTarget(lib/**/libname.so.rev) @@\
@@ -157,4 +174,5 @@
$(RM) lib/**/libname.so.rev sodir/?*.o strings*
+#endif
#endif /* SubdirBuildNormalSharedLibraryTarget */
@@ -246,6 +264,7 @@
.c.o: @@\
$(RM) $@ shared/$@ @@\
- $(CC) $(PIC) $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $(STRCONST) -c $*.c \ @@\
- -o shared/$*.o @@\
+ $(CC) -c $(PIC) $(SHAREDCODEDEF) \ @@\
+ $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
+ $(CP) $*.o shared/$*.o @@\
@@\
clean:: @@\
@@ -257,22 +276,24 @@
/*
- * SubdirSharedAndDebuggedLibraryObjectRule - generate make rules to build shared,
- * debuggable, and "normal" object files.
+ * SubdirSharedAndDebuggedLibraryObjectRule - generate make rules to
+ * build shared, debuggable, and "normal" object files.
*/
#ifndef SubdirSharedAndDebuggedLibraryObjectRule
-#define SubdirSharedAndDebuggedLibraryObjectRule() @@\
+#define SubdirSharedAndDebuggedLibraryObjectRule() @@\
all:: @@\
-@if [ ! -d shared ]; then mkdir shared; else exit 0; fi @@\
-@if [ ! -f $(XSTR_STRINGS_FILE) ]; then \ @@\
touch $(XSTR_STRINGS_FILE); else exit 0; fi @@\
- -@if [ -f strings ]; then $(RM) strings; else exit 0; fi @@\
- $(LN) $(XSTR_STRINGS_FILE) strings @@\
+ -@if [ ! -f strings ]; then \ @@\
+ $(LN) $(XSTR_STRINGS_FILE) strings; else exit 0; fi @@\
-@if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @@\
@@\
.c.o: @@\
$(RM) $@ shared/$@ debugger/$@ @@\
- $(CC) -g -c $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
+ $(CC) -c -g $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
$(CP) $*.o debugger/$*.o @@\
- $(CC) -c $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
+ $(CC) -c $(PIC) $(SHAREDCODEDEF) \ @@\
+ $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
+ $(CP) $*.o shared/$*.o @@\
@@\
clean:: @@\
@@ -367,7 +388,7 @@
#define InstallSharedLibraryNoBuild(libname,rev,dest) @@\
install:: @@\
- $(RM) /dest/lib/**/libname.so @@\
+ $(RM) /dest/lib/**/libname.so @@\
$(INSTALL) -c $(INSTSHAREDLIBFLAGS) lib/**/libname.so.rev dest @@\
- (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so)
+ (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so)
#endif /* InstallSharedLibraryNoBuild */
|