~ubuntu-branches/ubuntu/intrepid/stfl/intrepid

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Nico Golde
  • Date: 2007-08-07 13:06:54 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070807130654-fmvsraotulj0nbri
Tags: 0.15-3
Again added fPIC to CFLAGS. Hopefully all build issues
are fixed now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
#  STFL - The Structured Terminal Forms Language/Library
3
 
#  Copyright (C) 2006  Clifford Wolf <clifford@clifford.at>
4
 
#
5
 
#  This program is free software; you can redistribute it and/or modify
6
 
#  it under the terms of the GNU General Public License as published by
7
 
#  the Free Software Foundation; either version 2 of the License, or
8
 
#  (at your option) any later version.
9
 
#
10
 
#  This program is distributed in the hope that it will be useful,
 
3
#  Copyright (C) 2006, 2007  Clifford Wolf <clifford@clifford.at>
 
4
#
 
5
#  This library is free software; you can redistribute it and/or
 
6
#  modify it under the terms of the GNU Lesser General Public
 
7
#  License as published by the Free Software Foundation; either
 
8
#  version 3 of the License, or (at your option) any later version.
 
9
#  
 
10
#  This library is distributed in the hope that it will be useful,
11
11
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
#  GNU General Public License for more details.
14
 
#
15
 
#  You should have received a copy of the GNU General Public License
16
 
#  along with this program; if not, write to the Free Software
17
 
#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
12
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
#  Lesser General Public License for more details.
 
14
#  
 
15
#  You should have received a copy of the GNU Lesser General Public
 
16
#  License along with this library; if not, write to the Free Software
 
17
#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
18
#  MA 02110-1301 USA
18
19
#
19
20
 
20
21
include Makefile.cfg
21
22
 
22
 
CFLAGS += -I. -Wall -O0 -ggdb
23
 
LDLIBS += -lcurses
 
23
export CC = gcc
 
24
export CFLAGS += -I. -Wall -Os -ggdb -D_GNU_SOURCE -fPIC
 
25
export LDLIBS += -lncursesw
24
26
 
25
27
all: libstfl.a example
26
28
 
27
 
example: LDFLAGS += -L.
28
 
example: LDLIBS += -lstfl
29
 
example: libstfl.a
 
29
example: libstfl.a example.o
30
30
 
31
 
libstfl.a: public.o base.o parser.o dump.o style.o \
 
31
libstfl.a: public.o base.o parser.o dump.o style.o binding.o iconv.o \
32
32
           $(patsubst %.c,%.o,$(wildcard widgets/*.c))
33
33
        rm -f $@
34
34
        ar qc $@ $^
42
42
        rm -f python/stfl.py python/stfl.pyc python/_stfl.so 
43
43
        rm -f python/stfl_wrap.c python/stfl_wrap.o
44
44
        rm -f ruby/Makefile ruby/stfl_wrap.c ruby/stfl_wrap.o
45
 
        rm -f ruby/stfl.so ruby/build_ok
 
45
        rm -f ruby/stfl.so ruby/build_ok Makefile.deps_new
46
46
 
47
 
Makefile.deps: *.c *.h
48
 
        $(CC) -MM *.c > Makefile.deps
 
47
Makefile.deps: *.c widgets/*.c *.h
 
48
        $(CC) -I. -MM *.c > Makefile.deps_new
 
49
        $(CC) -I. -MM widgets/*.c | sed -r 's,^wt_[^ ]*\.o: ,widgets/&,' >> Makefile.deps_new
 
50
        mv -f Makefile.deps_new Makefile.deps
49
51
 
50
52
install: all
51
 
        mkdir -p $(prefix)/lib
52
 
        mkdir -p $(prefix)/include
53
 
        install -m 644 libstfl.a $(prefix)/lib/
54
 
        install -m 644 stfl.h $(prefix)/include/
 
53
        mkdir -p $(DESTDIR)$(prefix)/lib
 
54
        mkdir -p $(DESTDIR)$(prefix)/include
 
55
        install -m 644 libstfl.a $(DESTDIR)$(prefix)/lib/
 
56
        install -m 644 stfl.h $(DESTDIR)$(prefix)/include/
55
57
 
56
58
ifeq ($(FOUND_SPL),1)
57
59
include spl/Makefile.snippet