[libs] [utils]: newt: Added source package newt which provides libnewt, a lightweight...
[openwrt/svn-archive/archive.git] / libs / newt / patches / 100-compile-fix-broken-makefile.patch
1 --- a/Makefile.in
2 +++ b/Makefile.in
3 @@ -4,7 +4,7 @@ LIBTCL = -ltcl8.4
4 CC = @CC@
5 CPP = @CPP@
6 CFLAGS = @CFLAGS@
7 -CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@
8 +CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@
9
10 SHLIBFLAGS= -Wl,--version-script,newt.0.52.ver
11 VERSION = @VERSION@
12 @@ -53,19 +53,19 @@ endif
13 all: $(TARGET) _snackmodule.so
14
15 test: test.o $(LIBNEWT)
16 - $(CC) -g -o test test.o $(LIBNEWT) $(LIBS)
17 + $(CC) $(CFLAGS) -g -o test test.o $(LIBNEWT) $(LIBS)
18
19 testgrid: testgrid.o $(LIBNEWT)
20 - $(CC) -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
21 + $(CC) $(CFLAGS) -g -o testgrid testgrid.o $(LIBNEWT) $(LIBS)
22
23 testtree: testtree.o $(LIBNEWT)
24 - $(CC) -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
25 + $(CC) $(CFLAGS) -g -o testtree testtree.o $(LIBNEWT) $(LIBS)
26
27 showchars: showchars.o $(LIBNEWT)
28 - $(CC) -g -o showchars showchars.o $(LIBNEWT) $(LIBS)
29 + $(CC) $(CFLAGS) -g -o showchars showchars.o $(LIBNEWT) $(LIBS)
30
31 showkey: showkey.o $(LIBNEWT)
32 - $(CC) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
33 + $(CC) $(CFLAGS) -g -o showkey showkey.o $(LIBNEWT) $(LIBS)
34
35 _snackmodule.so: snackmodule.c $(LIBNEWTSH)
36 for ver in $(PYTHONVERS) ; do \
37 @@ -76,7 +76,7 @@ _snackmodule.so: snackmodule.c $(LIBNE
38 touch $@
39
40 whiptail: $(NDIALOGOBJS) $(LIBNEWTSH)
41 - $(CC) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
42 + $(CC) $(CFLAGS) -g -o whiptail $(NDIALOGOBJS) -L . -lnewt $(LIBS) -lpopt
43
44 whiptcl.so: $(WHIPTCLOBJS) $(LIBNEWTSH)
45 $(CC) -shared $(SHCFLAGS) -o whiptcl.so $(WHIPTCLOBJS) -L . -lnewt $(LIBTCL) -lpopt
46 @@ -102,12 +102,12 @@ $(SHAREDDIR):
47 sharedlib: $(LIBNEWTSH)
48
49 $(LIBNEWTSH): $(SHAREDDIR) $(SHAREDOBJS)
50 - $(CC) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(LIBS)
51 + $(CC) $(CFLAGS) -shared -o $(LIBNEWTSH) $(SHLIBFLAGS) -Wl,-soname,$(LIBNEWTSONAME) $(SHAREDOBJS) $(LIBS)
52 ln -fs $(LIBNEWTSONAME) libnewt.so
53 ln -fs $(LIBNEWTSH) $(LIBNEWTSONAME)
54
55 $(SHAREDDIR)/%.o : %.c
56 - $(CC) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
57 + $(CC) $(CFLAGS) $(SHCFLAGS) -c $(CFLAGS) $(CPPFLAGS) -o $@ $<
58
59 install: $(LIBNEWT) install-sh whiptail
60 [ -d $(instroot)/$(bindir) ] || install -m 755 -d $(instroot)/$(bindir)