summaryrefslogtreecommitdiffstats
path: root/math/calctool/files/patch-ab
blob: d7b779985d83128504f589855b7d0b879c2260b5 (plain)
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
--- Makefile.orig	Sat May 29 20:35:43 1993
+++ Makefile	Thu Jul 13 12:05:36 2006
@@ -28,7 +28,7 @@
 #  It can also be specified here by uncommenting the following
 #  macro definition and setting appropriately.
 #
-HELPNAME        = -DHELPNAME=\"$(LIBDIR)/calctool.help\"
+HELPNAME        = -DHELPNAME=\"%%DATADIR%%/calctool.help\"
 #-----------------------------------------------------------------------
 #  An attempt is now made at using a portable math library. You should
 #  carefully setup the following three definitions.
@@ -85,13 +85,13 @@
 #  uncomment the other three definitions below, commented out the initial
 #  two.
 #
-LIBNAME         = libcalctool.a
-CALCLIB	        = $(LIBNAME)
+#LIBNAME         = libcalctool.a
+#CALCLIB	        = $(LIBNAME)
 #
 # Shared library definitions. Uncomment if required.
-#LIBNAME         = libcalctool.so.1.1
-#CALCLIB         = -L. -lcalctool
-#SHLIB           = -pic
+LIBNAME         = libcalctool.so.1
+CALCLIB         = -L . -lcalctool
+SHLIB           = %%FPIC%%
 #-----------------------------------------------------------------------
 #  If you are not running under a BSD4.3 derived system, then the
 #  second parameter to a select call is a pointer to an integer function,
@@ -116,38 +116,37 @@
 #  library files are not in a standard place, then the following
 #  two lines should be uncommented, and set appropriately.
 #
-#X11INCDIR         = -I$(OPENWINHOME)/include
-#X11LIBDIR         = -L$(OPENWINHOME)/lib
+X11INCDIR         = -I%%X11BASE%%/include
+X11LIBDIR         = -L%%X11BASE%%/lib
 #-------------------------------------------------------------------------
 #  If you are compiling the XView version, then the following two lines
 #  should be uncommented.
 #
-XVIEWINCDIR      = -I$(OPENWINHOME)/include
-XVIEWLIBDIR      = -L$(OPENWINHOME)/lib
+XVIEWINCDIR      = -I%%X11BASE%%/include
+XVIEWLIBDIR      = -L%%X11BASE%%/lib
 #
 #=========================================================================
 #
 #  Default locations where calctool files will be installed.
 #  You might wish to alter these values.
 #
-BINDIR          = /usr/local/bin
-LIBDIR          = /usr/local/lib
-MANDIR          = /usr/man/man$(MANSECT)
-MANSECT         = l
+BINDIR          = $(PREFIX)/bin
+LIBDIR          = $(PREFIX)/lib
+MANDIR          = $(PREFIX)/man/man$(MANSECT)
+MANSECT         = 1
 #
 #  Compilation flags and standard macro definitions.
 #
-CFLAGS		= -g $(HELPNAME) $(NEWSFILE) $(STUPID_FPE) $(NOIEEE) \
+CFLAGS		+=   $(HELPNAME) $(NEWSFILE) $(STUPID_FPE) $(NOIEEE) \
 		     $(NOINDEX) $(RCNAME) $(SELTYPE) $(SHLIB) $(SIGRET) \
 		     $(SUN4_KEYBOARD) $(TTEXT) $(MGRPARAM) $(MGRINCDIR) \
 		     $(X11INCDIR) $(XVIEWINCDIR)
 #
 #=========================================================================
 
-BINARIES        = mgr_calctool ps_calctool sv_calctool \
-		  tty_calctool xcalctool xv_calctool
+BINARIES        = %%BINARIES%%
 
-CC		= cc
+#CC		= cc
 
 LIBSRCS         = graphics.c display.c functions.c get.c
 LIBOBJS         = graphics.o display.o functions.o get.o
@@ -208,19 +207,16 @@
 		$(CC) -o sv_calctool $(CFLAGS) $(STDOBJS) sunview.o $(SVIEWLIBS)
 		-cp sv_calctool calctool
 
-tty:            $(OBJS) tty.o
+tty_calctool:   $(OBJS) tty.o
 		$(CC) -o tty_calctool $(CFLAGS) $(STDOBJS) tty.o $(TTYLIBS)
-		-cp tty_calctool calctool
 
-x11:            $(OBJS) x11.o
+xcalctool:      $(OBJS) x11.o
 		$(CC) -o xcalctool $(X11LIBDIR) $(CFLAGS) $(STDOBJS) x11.o \
 				$(X11LIBS)
-		-cp xcalctool calctool
 
-xview:          $(OBJS) xview.o
+xv_calctool:    $(OBJS) xview.o
 		$(CC) -o xv_calctool $(XVIEWLIBDIR) $(CFLAGS) $(STDOBJS) \
 				xview.o $(XVIEWLIBS)
-		-cp xv_calctool calctool
 
 libcalctool.a:  $(LIBOBJS)
 		ar rv $@ $?
@@ -229,8 +225,9 @@
 #  These are the library creation rules for making the shared calctool
 #  library (available with SunOS v4.x).
  
-libcalctool.so.1.1:     $(LIBOBJS)
-			ld -o libcalctool.so.1.1 -assert pure-text $?
+libcalctool.so.1:	$(LIBOBJS)
+			$(CC) -shared -o ${LIBNAME} $?
+			ln -sf ${LIBNAME} libcalctool.so
 
 install:
 		install -c -m 644 $(LIBNAME) $(LIBDIR)
OpenPOWER on IntegriCloud