blob: d73d4a146e1d70431bc1da656937c2937f475ced (
plain) (
blame)
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
|
--- Makefile.in.orig 2009-09-24 17:03:09.000000000 +0200
+++ Makefile.in 2010-11-03 15:56:33.000000000 +0100
@@ -2,7 +2,7 @@ LIBS = -lslang
LIBTCL = -ltcl8.4
CC = @CC@
-CPP = @CPP@
+CPP = $(CC) -E
CFLAGS = @CFLAGS@
CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
@@ -50,7 +50,7 @@ else
TARGET=depend $(PROGS)
endif
-all: $(TARGET) _snackmodule.so
+all: $(TARGET)
test: test.o $(LIBNEWT)
$(CC) -g -o test test.o $(LIBNEWT) $(LIBS)
@@ -67,19 +67,19 @@ showchars: showchars.o $(LIBNEWT)
showkey: showkey.o $(LIBNEWT)
$(CC) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
+ifdef PYTHONVERS
+install-sh: _snackmodule.so
+all: _snackmodule.so
_snackmodule.so: snackmodule.c $(LIBNEWTSH)
- for ver in $(PYTHONVERS) ; do \
- mkdir -p $$ver ;\
- $(CC) $(CFLAGS) -I/usr/include/$$ver $(SHCFLAGS) -c -o $$ver/snackmodule.o snackmodule.c ;\
- $(CC) --shared $(SHCFLAGS) -o $$ver/_snackmodule.so $$ver/snackmodule.o -L . -lnewt ;\
- done
- touch $@
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I${LOCALBASE}/include/python${PYTHONVERS} $(SHCFLAGS) -c -o snackmodule.o snackmodule.c
+ $(CC) --shared $(SHCFLAGS) -o _snackmodule.so snackmodule.o -L . -lnewt
+endif
whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
$(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
- $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lpopt
+ $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) $(LIBS) -lpopt
$(LIBNEWT): $(LIBOBJS)
ar rv $@ $^
@@ -118,20 +118,20 @@ install: $(LIBNEWT) install-sh whiptail
install -m 644 $(LIBNEWT) $(instroot)/$(libdir)
install -m 755 whiptail $(instroot)/$(bindir)
install -m 644 whiptail.1 $(instroot)/$(man1dir)
- make -C po datadir=$(instroot)/$(datadir) install
- install -m 644 -D libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
+ ${MAKE} -C po datadir=$(instroot)/$(datadir) install
+ install -m 644 libnewt.pc $(instroot)/$(pkgconfigdir)/libnewt.pc
-install-sh: sharedlib $(WHIPTCLSO) _snackmodule.so
+install-sh: sharedlib $(WHIPTCLSO)
[ -d $(instroot)/$(libdir) ] || install -m 755 -d $(instroot)/$(libdir)
install -m 755 $(LIBNEWTSH) $(instroot)/$(libdir)
ln -sf $(LIBNEWTSONAME) $(instroot)/$(libdir)/libnewt.so
ln -sf $(LIBNEWTSH) $(instroot)/$(libdir)/$(LIBNEWTSONAME)
- [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so $(instroot)/$(libdir) || :
- for ver in $(PYTHONVERS) ; do \
- [ -d $(instroot)/$(libdir)/$$ver/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/$$ver/site-packages ;\
- install -m 755 $$ver/_snackmodule.so $(instroot)/$(libdir)/$$ver/site-packages ;\
- install -m 644 snack.py $(instroot)/$(libdir)/$$ver/site-packages ;\
- done
+ [ -n "$(WHIPTCLSO)" ] && install -m 755 whiptcl.so ${TCL_LIBDIR}/whip || :
+ifdef PYTHONVERS
+ [ -d $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages ] || install -m 755 -d $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
+ install -m 755 _snackmodule.so $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
+ install -m 644 snack.py $(instroot)/$(libdir)/python${PYTHONVERS}/site-packages
+endif
Makefile: newt.spec
echo "You need to rerun ./configure before continuing"
|