~ubuntu-branches/ubuntu/trusty/editline/trusty

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Jim Studt
  • Date: 2001-11-15 19:00:00 UTC
  • Revision ID: james.westby@ubuntu.com-20011115190000-5g995xfym9hjgt8o
Tags: 1.12-4
Add a Build-Depends for debhelper and libtool.  Thought those
were baseline.  closes: #117780

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
##      -DUSE_TERMCAP           Use the termcap library for terminal size
18
18
##                              see LDFLAGS, below, if you set this.
19
19
##      -DNEED_PERROR           Don't have perror() (used in testit)
 
20
 
20
21
##      -DDO_SIGTSTP            Send SIGTSTP on "suspend" key
21
22
DEFS    = -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX -DNEED_STRDUP
 
23
DEFS    = -DANSI_ARROWS -DHAVE_STDLIB -DHAVE_TCGETATTR -DHIDE -DUSE_DIRENT -DSYS_UNIX
22
24
 
23
25
##  Set your C compiler:
24
26
WARN    = -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wwrite-strings \
26
28
CC      = gcc -ansi $(WARN)
27
29
#CFLAGS = $(DEFS) -O -g
28
30
#CC     = gcc
29
 
CFLAGS  = $(DEFS) -g
 
31
CFLAGS  = $(DEFS) -D_POSIX_SOURCE -D_BSD_SOURCE
30
32
 
31
33
##  If you have -DUSE_TERMCAP, set this as appropriate:
32
34
#LDFLAGS = -ltermlib
41
43
SOURCES = editline.c complete.c sysunix.c
42
44
OBJECTS = editline.o complete.o sysunix.o
43
45
 
44
 
all:            libedit.a
45
 
 
46
 
testit:         testit.c libedit.a
47
 
        $(CC) $(CFLAGS) -o testit testit.c libedit.a $(LDFLAGS)
 
46
all:            libeditline.a libeditline.la
 
47
 
 
48
testit:         testit.c libeditline.a
 
49
        $(CC) $(CFLAGS) -o testit testit.c libeditline.a $(LDFLAGS)
 
50
 
 
51
editline.o editline.lo : editline.c
 
52
        libtool $(CC) $(CFLAGS) -c $<
 
53
 
 
54
complete.o complete.lo : complete.c
 
55
        libtool $(CC) $(CFLAGS) -c $<
 
56
 
 
57
sysunix.o sysunix.lo : sysunix.c
 
58
        libtool $(CC) $(CFLAGS) -c $<
48
59
 
49
60
shar:           FORCE
50
61
        shar `sed -e 1,2d -e 's/[       ].*//' <MANIFEST` >shar
51
62
 
 
63
install:
 
64
        install -m644 libeditline.a $(DESTDIR)/usr/lib/
 
65
        libtool install -c libeditline.la $(DESTDIR)/usr/lib/libeditline.la
 
66
 
52
67
FORCE:
53
68
 
54
69
clean:
55
 
        rm -f *.[oa] testit foo core tags lint lint.all a.out Part01
 
70
        rm -rf *.[oa] *.lo testit foo core tags lint lint.all a.out Part01 .libs
56
71
 
57
72
lint:           testit
58
73
        lint -a -b -u -x $(DEFS) $(SOURCES) testit.c >lint.all
61
76
                -e '/mix of old and new style function declaration/'d \
62
77
                <lint.all >lint
63
78
 
64
 
libedit.a:      $(OBJECTS)
65
 
        @rm -f $@
66
 
        ar r $@ $(OBJECTS)
67
 
        $(RANLIB) $@
 
79
#libedit.a:     $(OBJECTS)
 
80
#       libtool $(CC) $(LDFLAGS) -o $@ $^
 
81
 
 
82
libeditline.a libeditline.la :  $(OBJECTS:.o=.lo)
 
83
        libtool $(CC) -rpath /usr/lib $(LDFLAGS) -version-info 0:0:0 -o $@ $^
68
84
 
69
85
$(OBJECTS):     editline.h