Lines 1-39
Link Here
|
1 |
--- Makefile.in.orig Thu Feb 3 18:57:57 2000 |
1 |
--- Makefile.in.orig Tue Jan 23 15:27:38 2001 |
2 |
+++ Makefile.in Sat Jul 22 01:45:55 2000 |
2 |
+++ Makefile.in Sun Mar 17 17:46:32 2002 |
3 |
@@ -1,16 +1,12 @@ |
3 |
@@ -1,18 +1,14 @@ |
4 |
-LIBS = -lslang -lm #-lefence |
4 |
-LIBS = -lslang -lm #-lefence |
5 |
-SHLIBS = -lslang -lm -lc |
5 |
-SHLIBS = -lslang -lm -lc |
6 |
+CC ?= cc |
6 |
+CC ?= cc |
7 |
+LIBS = -L$(PREFIX)/lib -lslang -ltcl82 -lpopt -lncurses -lm |
7 |
+LIBS = -L$(PREFIX)/lib -lslang -lpopt -lncurses -lm |
|
|
8 |
+TCLLIBS = -l${TCLVERSION:S/.//g} |
8 |
+SHLIBS = $(LIBS) |
9 |
+SHLIBS = $(LIBS) |
9 |
|
10 |
|
10 |
-GPM_SUPPORT=@gpm_support@ |
11 |
-GPM_SUPPORT=@gpm_support@ |
11 |
+CFLAGS = $(PCFLAGS) -Wall -I$(prefix)/include -I$(prefix)/include/tcl8.2 |
12 |
+CFLAGS = $(PCFLAGS) -Wall -I$(prefix)/include -I$(prefix)/include/${TCLVERSION} |
12 |
|
13 |
|
13 |
-CFLAGS = $(RPM_OPT_FLAGS) -Wall -I/usr/include/slang |
14 |
-CFLAGS = $(RPM_OPT_FLAGS) -Wall -I/usr/include/slang |
14 |
-ifeq ($(RPM_OPT_FLAGS),) |
15 |
-ifeq ($(RPM_OPT_FLAGS),) |
15 |
-CFLAGS += -g # -O2 -I/usr/include/slang |
16 |
-CFLAGS += -g # -O2 -I/usr/include/slang |
16 |
-endif |
17 |
-endif |
17 |
- |
|
|
18 |
-VERSION = @VERSION@ |
19 |
+VERSION ?= 0 |
18 |
+VERSION ?= 0 |
20 |
CVSTAG = r$(subst .,-,$(VERSION)) |
19 |
+SONAME = ${VERSION} |
21 |
-SONAME = @SONAME@ |
|
|
22 |
+SONAME = $(VERSION) |
23 |
|
20 |
|
24 |
PROGS = test whiptail whiptcl.so testgrid testtree |
21 |
-VERSION = @VERSION@ |
|
|
22 |
-CVSTAG = r$(subst .,-,$(VERSION)) |
23 |
-SONAME = @SONAME@ |
24 |
- |
25 |
-PROGS = test whiptail whiptcl.so testgrid testtree |
26 |
+PROGS = test whiptail testgrid testtree |
25 |
TESTOBJS = test.o |
27 |
TESTOBJS = test.o |
26 |
@@ -25,7 +21,7 @@ |
28 |
NDIALOGOBJS = whiptail.o dialogboxes.o |
|
|
29 |
WHIPTCLOBJS = whiptcl.o dialogboxes.o |
30 |
@@ -25,51 +21,50 @@ |
27 |
|
31 |
|
28 |
SHCFLAGS = -fPIC |
32 |
SHCFLAGS = -fPIC |
29 |
|
33 |
|
30 |
-prefix = /usr |
34 |
-prefix = /usr |
31 |
+prefix ?= /usr/local |
35 |
+prefix ?= ${PREFIX} |
32 |
includedir = $(prefix)/include |
36 |
includedir = $(prefix)/include |
33 |
libdir = $(prefix)/lib |
37 |
libdir = $(prefix)/lib |
34 |
bindir = $(prefix)/bin |
38 |
bindir = $(prefix)/bin |
35 |
@@ -49,25 +45,25 @@ |
39 |
-ARCHNAME = $(shell uname -m | sed 's/i.86/i386/') |
36 |
all: $(TARGET) _snackmodule.so |
40 |
pythondir = $(prefix)/lib/python1.5 |
|
|
41 |
pythonbindir = $(prefix)/lib/python1.5/lib-dynload |
42 |
|
43 |
#-------------------------------------- |
44 |
|
45 |
-SOURCES = $(subst .o,.c,$(TESTOBJS) $(NDIALOGOBJS) $(LIBOBJS)) |
46 |
+SOURCES = ${TESTOBJS:S/.o/.c/g} ${NDIALOGOBJS:S/.o/.c/g} ${LIBOBJS:S/.o/.c/g} |
47 |
|
48 |
SHAREDDIR = shared |
49 |
SHAREDOBJS = $(patsubst %,$(SHAREDDIR)/%, $(LIBOBJS)) |
50 |
+.if defined(WITH_TCL) |
51 |
+TCLTARGET=whiptcl.so |
52 |
+.endif |
53 |
+TARGET=${PROGS} ${TCLTARGET} |
54 |
+ |
55 |
+.if !exists(.depend) |
56 |
+TARGET+=depend |
57 |
+.endif |
58 |
|
59 |
-ifeq (.depend,$(wildcard .depend)) |
60 |
-TARGET=$(PROGS) |
61 |
-else |
62 |
-TARGET=depend $(PROGS) |
63 |
-endif |
64 |
- |
65 |
-all: $(TARGET) _snackmodule.so |
66 |
+all: $(TARGET) |
37 |
|
67 |
|
38 |
test: $(TESTOBJS) $(LIBNEWT) |
68 |
test: $(TESTOBJS) $(LIBNEWT) |
39 |
- gcc -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static |
69 |
- gcc -g -o test $(TESTOBJS) $(LIBNEWT) $(LIBS) -static |
Lines 45-71
Link Here
|
45 |
|
75 |
|
46 |
testtree: testtree.o $(LIBNEWT) |
76 |
testtree: testtree.o $(LIBNEWT) |
47 |
- gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS) |
77 |
- gcc -g -o testtree testtree.o $(LIBNEWT) $(LIBS) |
48 |
+ $(CC) -o testtree testtree.o $(LIBNEWT) $(LIBS) |
78 |
- |
49 |
|
79 |
-_snackmodule.so: snackmodule.o $(LIBNEWTSH) |
50 |
_snackmodule.so: snackmodule.o $(LIBNEWTSH) |
80 |
- gcc --shared $(SHCFLAGS) -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH) |
51 |
- gcc --shared -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH) |
81 |
- |
52 |
+ $(CC) --shared -o _snackmodule.so snackmodule.o -L . $(LIBNEWTSH) |
82 |
-snackmodule.o: snackmodule.c |
53 |
|
|
|
54 |
snackmodule.o: snackmodule.c |
55 |
- gcc -I/usr/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c |
83 |
- gcc -I/usr/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c |
56 |
+ $(CC) -I$(prefix)/include/python1.5 -fPIC $(CFLAGS) -c snackmodule.c |
84 |
+ $(CC) -o testtree testtree.o $(LIBNEWT) $(LIBS) |
57 |
|
85 |
|
58 |
whiptail: $(NDIALOGOBJS) $(LIBNEWTSH) |
86 |
whiptail: $(NDIALOGOBJS) $(LIBNEWTSH) |
59 |
- gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt |
87 |
- gcc -g -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) -lpopt |
60 |
+ $(CC) -o whiptail $(NDIALOGOBJS) -L . $(LIBNEWTSH) $(LIBS) |
88 |
+ $(CC) -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) |
61 |
|
89 |
|
|
|
90 |
+.if defined(WITH_TCL) |
62 |
whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH) |
91 |
whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH) |
63 |
- gcc -shared -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) -ltcl -lslang -lpopt -lm |
92 |
- gcc -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) -ltcl -lslang -lpopt -lm |
64 |
+ $(CC) -shared -o whiptcl.so $(WHIPTCLOBJS) -L . $(LIBNEWTSH) $(LIBS) |
93 |
+ $(CC) -shared -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBS) $(TCLLIBS) |
65 |
|
94 |
+.endif |
66 |
$(LIBNEWT): $(LIBNEWT)($(LIBOBJS)) |
95 |
|
67 |
|
96 |
-$(LIBNEWT): $(LIBNEWT)($(LIBOBJS)) |
68 |
@@ -90,7 +86,7 @@ |
97 |
+$(LIBNEWT): $(LIBOBJS) |
|
|
98 |
+ ar q ${LIBNEWT} ${LIBOBJS} |
99 |
+ ranlib ${LIBNEWT} |
100 |
|
101 |
newt.o: newt.c Makefile |
102 |
$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c -o $@ $< |
103 |
@@ -82,7 +77,7 @@ |
104 |
$(SHAREDOBJS) *.so* |
105 |
|
106 |
depend: |
107 |
- $(CPP) $(CFLAGS) -M $(SOURCES) > .depend |
108 |
+ mkdep $(CFLAGS) $(SOURCES) |
109 |
|
110 |
$(SHAREDDIR): |
111 |
mkdir -p $(SHAREDDIR) |
112 |
@@ -90,7 +85,7 @@ |
69 |
sharedlib: $(LIBNEWTSH) |
113 |
sharedlib: $(LIBNEWTSH) |
70 |
|
114 |
|
71 |
$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) |
115 |
$(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS) |
Lines 74-80
Link Here
|
74 |
|
118 |
|
75 |
$(SHAREDDIR)/%.o : %.c |
119 |
$(SHAREDDIR)/%.o : %.c |
76 |
$(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $< |
120 |
$(CC) $(SHCFLAGS) -c $(CFLAGS) -o $@ $< |
77 |
@@ -100,21 +96,23 @@ |
121 |
@@ -100,21 +95,20 @@ |
78 |
|
122 |
|
79 |
|
123 |
|
80 |
install: $(LIBNEWT) install-sh whiptail |
124 |
install: $(LIBNEWT) install-sh whiptail |
Lines 84-98
Link Here
|
84 |
- install -m 644 newt.h $(instroot)/$(includedir) |
128 |
- install -m 644 newt.h $(instroot)/$(includedir) |
85 |
- install -m 644 $(LIBNEWT) $(instroot)/$(libdir) |
129 |
- install -m 644 $(LIBNEWT) $(instroot)/$(libdir) |
86 |
- install -s -m 755 whiptail $(instroot)/$(bindir) |
130 |
- install -s -m 755 whiptail $(instroot)/$(bindir) |
87 |
+ [ -d $(bindir) ] || install -m 755 -d $(bindir) |
131 |
- |
88 |
+ [ -d $(libdir) ] || install -m 755 -d $(libdir) |
132 |
-install-sh: sharedlib whiptcl.so _snackmodule.so |
89 |
+ [ -d $(includedir) ] || install -m 755 -d $(includedir) |
|
|
90 |
+ install -c -m 644 newt.h $(includedir) |
91 |
+ install -c -m 644 $(LIBNEWT) $(libdir) |
92 |
+ install -c -s -m 755 whiptail $(bindir) |
93 |
+ |
94 |
|
95 |
install-sh: sharedlib whiptcl.so _snackmodule.so |
96 |
- [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir) |
133 |
- [ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir) |
97 |
- install -s -m 755 $(LIBNEWTSH) $(instroot)/$(libdir) |
134 |
- install -s -m 755 $(LIBNEWTSH) $(instroot)/$(libdir) |
98 |
- ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so |
135 |
- ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/libnewt.so |
Lines 100-113
Link Here
|
100 |
- [ -d $(instroot)/$(pythonbindir) ] || install -m 755 -d $(instroot)/$(pythonbindir) |
137 |
- [ -d $(instroot)/$(pythonbindir) ] || install -m 755 -d $(instroot)/$(pythonbindir) |
101 |
- install -s -m 755 _snackmodule.so $(instroot)/$(pythonbindir) |
138 |
- install -s -m 755 _snackmodule.so $(instroot)/$(pythonbindir) |
102 |
- install -m 755 snack.py $(instroot)/$(pythondir) |
139 |
- install -m 755 snack.py $(instroot)/$(pythondir) |
|
|
140 |
+ [ -d $(bindir) ] || install -m 755 -d $(bindir) |
141 |
+ [ -d $(libdir) ] || install -m 755 -d $(libdir) |
142 |
+ [ -d $(includedir) ] || install -m 755 -d $(includedir) |
143 |
+ install -c -m 644 newt.h $(includedir) |
144 |
+ install -c -m 644 $(LIBNEWT) $(libdir) |
145 |
+ install -c -s -m 755 whiptail $(bindir) |
146 |
+ |
147 |
+install-sh: sharedlib ${TCLTARGET} |
103 |
+ [ -d $(libdir) ] || install -m 755 -d $(libdir) |
148 |
+ [ -d $(libdir) ] || install -m 755 -d $(libdir) |
104 |
+ install -c -m 755 $(LIBNEWTSH) $(libdir) |
149 |
+ install -c -m 755 $(LIBNEWTSH) $(libdir) |
105 |
+ ln -sf $(LIBNEWTSH) $(libdir)/libnewt.so |
150 |
+ ln -sf $(LIBNEWTSH) $(libdir)/libnewt.so |
|
|
151 |
+.if defined(WITH_TCL) |
106 |
+ install -c -m 755 whiptcl.so $(libdir) |
152 |
+ install -c -m 755 whiptcl.so $(libdir) |
107 |
+ [ -d $(pythonbindir) ] || install -m 755 -d $(pythonbindir) |
153 |
+.endif |
108 |
+ install -c -m 755 _snackmodule.so $(pythonbindir) |
|
|
109 |
+ install -c -m 755 snack.py $(pythondir) |
110 |
+ |
111 |
|
154 |
|
112 |
configure: configure.in |
155 |
configure: configure.in |
113 |
autoconf |
156 |
autoconf |
|
|
157 |
@@ -133,6 +127,6 @@ |
158 |
@echo " " |
159 |
@echo "The final archive is ./newt-$(VERSION).tar.gz." |
160 |
|
161 |
-ifeq (.depend,$(wildcard .depend)) |
162 |
-include .depend |
163 |
-endif |
164 |
+.if exists(.depend) |
165 |
+.include ".depend" |
166 |
+.endif |