-
Notifications
You must be signed in to change notification settings - Fork 0
/
patch-makemake.diff
101 lines (90 loc) · 3.46 KB
/
patch-makemake.diff
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
--- makemake.orig 2009-02-28 16:57:42.000000000 -0500
+++ makemake 2009-02-28 16:58:30.000000000 -0500
@@ -100,6 +100,7 @@
#-----------------------------------------------------------------------
# Device drivers
#-----------------------------------------------------------------------
+AQDRIV="aqdriv.o"
ARDRIV="ardriv.o"
BCDRIV="bcdriv.o"
CADRIV="cadriv.o"
@@ -657,7 +658,9 @@
# Shared library creation.
#
SHARED_LIB=$SHARED_LIB
+CSHARED_LIB=$CSHARED_LIB
SHARED_LD=$SHARED_LD
+CSHARED_LD=$CSHARED_LD
#
# The libraries that the shared PGPLOT library depends upon.
# This is for systems that allow one to specify what libraries
@@ -824,7 +827,7 @@
cat >> makefile << \EOD
$(SHARED_LIB): $(PG_ROUTINES) $(PG_NON_STANDARD) \
$(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
- $(SHARED_LD) `ls $(PG_ROUTINES) \
+ $(SHARED_LD) -o $@ `ls $(PG_ROUTINES) \
$(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
$(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
EOD
@@ -1025,32 +1028,41 @@
grivas.o : $(DRVDIR)/gadef.h
grtv00.o : $(DRVDIR)/imdef.h
pgxwin.o : $(DRVDIR)/pgxwin.h
-pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
x2driv.o figdisp_comm.o: $(DRVDIR)/commands.h
-cpg: libcpgplot.a cpgplot.h cpgdemo
+cpg: libcpgplot.a cpgplot.h $(CSHARED_LIB) cpgdemo
@echo ' '
@echo '*** Finished compilation of the C PGPLOT wrapper library ***'
@echo ' '
@echo 'Note that if you plan to install the library in a different'
- @echo 'directory than the current one, both libcpgplot.a and cpgplot.h'
+ @echo 'directory than the current one, both libcpgplot.a, $(CSHARED_LIB), and cpgplot.h'
@echo 'will be needed.'
@echo ' '
pgbind: $(SRC)/cpg/pgbind.c
$(CCOMPL) $(CFLAGC) $(SRC)/cpg/pgbind.c -o pgbind
-libcpgplot.a cpgplot.h: $(PG_SOURCE) pgbind
- ./pgbind $(PGBIND_FLAGS) -h -w $(PG_SOURCE)
+cpgplot.h: $(PG_SOURCE) pgbind
+ ./pgbind $(PGBIND_FLAGS) -h $(PG_SOURCE)
+
+libcpgplot.a : cpgplot.h
+ ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE)
$(CCOMPL) -c $(CFLAGC) cpg*.c
rm -f cpg*.c
ar ru libcpgplot.a cpg*.o
$(RANLIB) libcpgplot.a
rm -f cpg*.o
-cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c libcpgplot.a
+$(CSHARED_LIB): cpgplot.h
+ ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE)
+ $(CCOMPL) -c $(CFLAGC) cpg*.c
+ rm -f cpg*.c
+ $(CSHARED_LD) -o $@ cpg*.o $(SHARED_LIB)
+ rm -f cpg*.o
+
+cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c $(CSHARED_LIB)
$(CCOMPL) $(CFLAGD) -c -I. $(SRC)/cpg/cpgdemo.c
$(FCOMPL) -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS)
rm -f cpgdemo.o
@@ -1058,13 +1070,13 @@
pgmdemo: pgmdemo.o libXmPgplot.a
$(FCOMPL) -o pgmdemo pgmdemo.o -L`pwd` -lXmPgplot $(CPGPLOT_LIB) $(MOTIF_LIBS)
-pgmdemo.o: $(XMDIR)/pgmdemo.c XmPgplot.h libcpgplot.a cpgplot.h
+pgmdemo.o: $(XMDIR)/pgmdemo.c XmPgplot.h $(CSHARED_LIB) cpgplot.h
$(CCOMPL) $(CFLAGD) -c -I`pwd` $(MOTIF_INCL) $(XMDIR)/pgmdemo.c
pgawdemo: pgawdemo.o libXaPgplot.a
$(FCOMPL) -o pgawdemo pgawdemo.o -L`pwd` -lXaPgplot $(CPGPLOT_LIB) $(ATHENA_LIBS)
-pgawdemo.o: $(XADIR)/pgawdemo.c XaPgplot.h libcpgplot.a cpgplot.h
+pgawdemo.o: $(XADIR)/pgawdemo.c XaPgplot.h $(CSHARED_LIB) cpgplot.h
$(CCOMPL) $(CFLAGD) -c -I`pwd` $(ATHENA_INCL) $(XADIR)/pgawdemo.c
pgtkdemo: pgtkdemo.o libtkpgplot.a
@@ -1074,6 +1086,6 @@
cp $(TKDIR)/pgtkdemo.tcl pgtkdemo.tcl
chmod a+x pgtkdemo.tcl
-pgtkdemo.o: $(TKDIR)/pgtkdemo.c tkpgplot.h libcpgplot.a cpgplot.h
+pgtkdemo.o: $(TKDIR)/pgtkdemo.c tkpgplot.h $(CSHARED_LIB) cpgplot.h
$(CCOMPL) $(CFLAGD) -c -I`pwd` $(TK_INCL) $(TKDIR)/pgtkdemo.c
EOD